diff options
author | jmg <jmg@FreeBSD.org> | 2004-09-05 02:34:12 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2004-09-05 02:34:12 +0000 |
commit | 8e8293b76576645a7323d6bce9cc4f8b1e544edd (patch) | |
tree | 41c4349d7abcca9eddfb8777895d58e45d58de0b /sys/netinet/udp_usrreq.c | |
parent | e291fa77140598041f22aa877b26c0844871d3ea (diff) | |
download | FreeBSD-src-8e8293b76576645a7323d6bce9cc4f8b1e544edd.zip FreeBSD-src-8e8293b76576645a7323d6bce9cc4f8b1e544edd.tar.gz |
fix up socket/ip layer violation... don't assume/know that
SO_DONTROUTE == IP_ROUTETOIF and SO_BROADCAST == IP_ALLOWBROADCAST...
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 39d1634..9c02395 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -879,7 +879,11 @@ udp_output(inp, m, addr, control, td) ui->ui_dport = fport; ui->ui_ulen = htons((u_short)len + sizeof(struct udphdr)); - ipflags = inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST); + ipflags = 0; + if (inp->inp_socket->so_options & SO_DONTROUTE) + ipflags |= IP_ROUTETOIF; + if (inp->inp_socket->so_options & SO_BROADCAST) + ipflags |= IP_ALLOWBROADCAST; if (inp->inp_flags & INP_ONESBCAST) ipflags |= IP_SENDONES; |