diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-05-23 16:14:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-05-23 16:14:38 +0000 |
commit | fd5488b68f2d65e741881ffb40b3bc20a7fc8ae4 (patch) | |
tree | 5b6cd8382aaf444e187a45cc25a765caa3aa5356 /sbin/isakmpd | |
parent | 9012a6a4f0234e753bbb20ea95811dfaebadb2aa (diff) |
remove excessive monitor_ prefixes
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/if.c | 7 | ||||
-rw-r--r-- | sbin/isakmpd/udp.c | 12 |
2 files changed, 10 insertions, 9 deletions
diff --git a/sbin/isakmpd/if.c b/sbin/isakmpd/if.c index 52bd4ec1905..f6488779cf7 100644 --- a/sbin/isakmpd/if.c +++ b/sbin/isakmpd/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.19 2004/04/15 18:39:25 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.20 2004/05/23 16:14:37 deraadt Exp $ */ /* $EOM: if.c,v 1.12 1999/10/01 13:45:20 niklas Exp $ */ /* @@ -65,7 +65,7 @@ siocgifconf(struct ifconf *ifcp) int s, len; /* Get a socket to ask for the network interface configurations. */ - s = monitor_socket(AF_INET, SOCK_DGRAM, 0); + s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) { log_error("siocgifconf: socket (AF_INET, SOCK_DGRAM, 0) failed"); return -1; @@ -88,6 +88,7 @@ siocgifconf(struct ifconf *ifcp) log_error("siocgifconf: ioctl (%d, SIOCGIFCONF, ...) failed", s); goto err; } + /* * If there is place for another ifreq we can be sure that the buffer * was big enough, otherwise double the size and try again. @@ -136,7 +137,7 @@ if_map(int (*func)(char *, struct sockaddr *, void *), void *arg) limit = ifc.ifc_buf + ifc.ifc_len; for (p = ifc.ifc_buf; p < limit; p += len) { ifrp = (struct ifreq *) p; - if ((*func) (ifrp->ifr_name, &ifrp->ifr_addr, arg) == -1) + if ((*func)(ifrp->ifr_name, &ifrp->ifr_addr, arg) == -1) err = -1; len = sizeof ifrp->ifr_name + MAX(sysdep_sa_len(&ifrp->ifr_addr), sizeof ifrp->ifr_addr); diff --git a/sbin/isakmpd/udp.c b/sbin/isakmpd/udp.c index f695dd58fa5..376ca492d2f 100644 --- a/sbin/isakmpd/udp.c +++ b/sbin/isakmpd/udp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp.c,v 1.69 2004/04/15 18:39:26 deraadt Exp $ */ +/* $OpenBSD: udp.c,v 1.70 2004/05/23 16:14:37 deraadt Exp $ */ /* $EOM: udp.c,v 1.57 2001/01/26 10:09:57 niklas Exp $ */ /* @@ -140,7 +140,7 @@ udp_make(struct sockaddr *laddr) log_print("udp_make: malloc (%lu) failed", (unsigned long) sizeof *t); return 0; } - s = monitor_socket(laddr->sa_family, SOCK_DGRAM, IPPROTO_UDP); + s = socket(laddr->sa_family, SOCK_DGRAM, IPPROTO_UDP); if (s == -1) { log_error("udp_make: socket (%d, %d, %d)", laddr->sa_family, SOCK_DGRAM, IPPROTO_UDP); @@ -153,11 +153,11 @@ udp_make(struct sockaddr *laddr) /* Wildcard address ? */ switch (laddr->sa_family) { case AF_INET: - if (((struct sockaddr_in *) laddr)->sin_addr.s_addr == INADDR_ANY) + if (((struct sockaddr_in *)laddr)->sin_addr.s_addr == INADDR_ANY) wildcardaddress = 1; break; case AF_INET6: - if (IN6_IS_ADDR_UNSPECIFIED(&((struct sockaddr_in6 *) laddr)->sin6_addr)) + if (IN6_IS_ADDR_UNSPECIFIED(&((struct sockaddr_in6 *)laddr)->sin6_addr)) wildcardaddress = 1; break; } @@ -169,7 +169,7 @@ udp_make(struct sockaddr *laddr) * sending from it make sure it is entirely reuseable with SO_REUSEPORT. */ on = 1; - if (monitor_setsockopt(s, SOL_SOCKET, + if (setsockopt(s, SOL_SOCKET, wildcardaddress ? SO_REUSEPORT : SO_REUSEADDR, (void *) &on, sizeof on) == -1) { log_error("udp_make: setsockopt (%d, %d, %d, %p, %lu)", s, SOL_SOCKET, @@ -345,7 +345,7 @@ udp_bind_if(char *ifname, struct sockaddr *if_addr, void *arg) return 0; } /* Don't bother with interfaces that are down. */ - s = monitor_socket(if_addr->sa_family, SOCK_DGRAM, 0); + s = socket(if_addr->sa_family, SOCK_DGRAM, 0); if (s == -1) { log_error("udp_bind_if: socket (%d, SOCK_DGRAM, 0) failed", if_addr->sa_family); |