diff options
author | 2014-10-14 09:55:44 +0000 | |
---|---|---|
committer | 2014-10-14 09:55:44 +0000 | |
commit | f7e6f2bd403921450c85ea80f2e6bbb7b5fc01cb (patch) | |
tree | f47df9261177579c0b405c7751c2f61f59cb0bbb | |
parent | Use rtfree() instead of RTFREE(), NULLify some free'd route pointers and (diff) | |
download | wireguard-openbsd-f7e6f2bd403921450c85ea80f2e6bbb7b5fc01cb.tar.xz wireguard-openbsd-f7e6f2bd403921450c85ea80f2e6bbb7b5fc01cb.zip |
Don't check for an empty list of interfaces. This is never true even if
you don't have a physical interface on your machine, so why rawip should
be more clever^Wparanoid than the others?
ok henning@, mikeb@
-rw-r--r-- | sys/netinet/raw_ip.c | 8 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index baa9b1898eb..82996e4ce72 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip.c,v 1.75 2014/08/14 08:22:38 mpi Exp $ */ +/* $OpenBSD: raw_ip.c,v 1.76 2014/10/14 09:55:44 mpi Exp $ */ /* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */ /* @@ -457,7 +457,7 @@ rip_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, error = EINVAL; break; } - if (TAILQ_EMPTY(&ifnet) || addr->sin_family != AF_INET) { + if (addr->sin_family != AF_INET) { error = EADDRNOTAVAIL; break; } @@ -479,10 +479,6 @@ rip_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, error = EINVAL; break; } - if (TAILQ_EMPTY(&ifnet)) { - error = EADDRNOTAVAIL; - break; - } if (addr->sin_family != AF_INET) { error = EAFNOSUPPORT; break; diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 1bfe5d10ed5..71403e3e4d3 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.68 2014/07/22 11:06:10 mpi Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.69 2014/10/14 09:55:44 mpi Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -665,7 +665,7 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, error = EINVAL; break; } - if (TAILQ_EMPTY(&ifnet) || (addr->sin6_family != AF_INET6)) { + if (addr->sin6_family != AF_INET6) { error = EADDRNOTAVAIL; break; } @@ -710,10 +710,6 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, error = EINVAL; break; } - if (TAILQ_EMPTY(&ifnet)) { - error = EADDRNOTAVAIL; - break; - } if (addr->sin6_family != AF_INET6) { error = EAFNOSUPPORT; break; |