diff options
author | 2004-01-31 21:09:15 +0000 | |
---|---|---|
committer | 2004-01-31 21:09:15 +0000 | |
commit | 748a68ec6a37cb7648628ba1cbf8451866f9e98b (patch) | |
tree | 9977749059f6c937c9e79b7f294ea7d46c06bf74 | |
parent | fix a few #if MACRO -> #if defined(MACRO) (-Wsystem-headers clean-up) (diff) | |
download | wireguard-openbsd-748a68ec6a37cb7648628ba1cbf8451866f9e98b.tar.xz wireguard-openbsd-748a68ec6a37cb7648628ba1cbf8451866f9e98b.zip |
rename tcp sockopt TCP_SIGNATURE_ENABLE to TCP_MD5SIG
requested by theo
ok markus@ hshoexer@
-rw-r--r-- | sys/netinet/tcp.h | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 6 | ||||
-rw-r--r-- | usr.bin/nc/netcat.c | 6 | ||||
-rw-r--r-- | usr.sbin/bgpd/session.c | 15 |
4 files changed, 15 insertions, 16 deletions
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index bf9e47c7133..b6d7bd83f43 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp.h,v 1.13 2004/01/31 19:40:09 markus Exp $ */ +/* $OpenBSD: tcp.h,v 1.14 2004/01/31 21:09:15 henning Exp $ */ /* $NetBSD: tcp.h,v 1.8 1995/04/17 05:32:58 cgd Exp $ */ /* @@ -118,7 +118,7 @@ struct tcphdr { */ #define TCP_NODELAY 0x01 /* don't delay send to coalesce pkts */ #define TCP_MAXSEG 0x02 /* set maximum segment size */ -#define TCP_SIGNATURE_ENABLE 0x04 /* enable TCP MD5 signature option */ +#define TCP_MD5SIG 0x04 /* enable TCP MD5 signature option */ #define TCP_SACK_ENABLE 0x08 /* enable SACKs (if disabled by def.) */ #endif /* _NETINET_TCP_H_ */ diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index b7130ce067a..c1cd8d33bf7 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.78 2004/01/31 19:40:10 markus Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.79 2004/01/31 21:09:15 henning Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -586,7 +586,7 @@ tcp_ctloutput(op, so, level, optname, mp) break; #endif #ifdef TCP_SIGNATURE - case TCP_SIGNATURE_ENABLE: + case TCP_MD5SIG: if (m == NULL || m->m_len < sizeof (int)) { error = EINVAL; break; @@ -631,7 +631,7 @@ tcp_ctloutput(op, so, level, optname, mp) break; #endif #ifdef TCP_SIGNATURE - case TCP_SIGNATURE_ENABLE: + case TCP_MD5SIG: *mtod(m, int *) = tp->t_flags & TF_SIGNATURE; break; #endif diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c index baeb3cefd1f..beca89e01c8 100644 --- a/usr.bin/nc/netcat.c +++ b/usr.bin/nc/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.65 2004/01/22 13:28:46 markus Exp $ */ +/* $OpenBSD: netcat.c,v 1.66 2004/01/31 21:09:15 henning Exp $ */ /* * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> * @@ -478,7 +478,7 @@ remote_connect(char *host, char *port, struct addrinfo hints) freeaddrinfo(ares); } if (Sflag) { - if (setsockopt(s, IPPROTO_TCP, TCP_SIGNATURE_ENABLE, + if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG, &x, sizeof(x)) == -1) err(1, NULL); } @@ -530,7 +530,7 @@ local_listen(char *host, char *port, struct addrinfo hints) if (ret == -1) err(1, NULL); if (Sflag) { - ret = setsockopt(s, IPPROTO_TCP, TCP_SIGNATURE_ENABLE, + ret = setsockopt(s, IPPROTO_TCP, TCP_MD5SIG, &x, sizeof(x)); if (ret == -1) err(1, NULL); diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 90ae940ffdf..cdd7dee33c7 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.105 2004/01/30 11:40:41 henning Exp $ */ +/* $OpenBSD: session.c,v 1.106 2004/01/31 21:09:15 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -117,9 +117,8 @@ setup_listener(void) opt = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt)) == -1) fatal("setsockopt SO_REUSEPORT"); - if (setsockopt(fd, IPPROTO_TCP, TCP_SIGNATURE_ENABLE, &opt, - sizeof(opt)) == -1) - fatal("setsockopt TCPSIGNATURE_ENABLE"); + if (setsockopt(fd, IPPROTO_TCP, TCP_MD5SIG, &opt, sizeof(opt)) == -1) + fatal("setsockopt TCP_MD5SIG"); if (bind(fd, (struct sockaddr *)&conf->listen_addr, sizeof(conf->listen_addr))) { @@ -730,9 +729,9 @@ session_accept(int listenfd) } if (p->conf.tcp_md5_key[0]) { len = sizeof(opt); - if (getsockopt(connfd, IPPROTO_TCP, - TCP_SIGNATURE_ENABLE, &opt, &len) == -1) - fatal("getsockopt TCP_SIGNATURE_ENABLE"); + if (getsockopt(connfd, IPPROTO_TCP, TCP_MD5SIG, + &opt, &len) == -1) + fatal("getsockopt TCP_MD5SIG"); if (!opt) { /* non-md5'd connection! */ log_peer_warnx(&p->conf, "connection attempt without md5 signature"); @@ -777,7 +776,7 @@ session_connect(struct peer *peer) } if (peer->conf.tcp_md5_key[0]) - if (setsockopt(peer->sock, IPPROTO_TCP, TCP_SIGNATURE_ENABLE, + if (setsockopt(peer->sock, IPPROTO_TCP, TCP_MD5SIG, &opt, sizeof(opt)) == -1) { log_peer_warn(&peer->conf, "setsockopt md5sig"); bgp_fsm(peer, EVNT_CON_OPENFAIL); |