diff options
author | 2013-08-13 09:52:53 +0000 | |
---|---|---|
committer | 2013-08-13 09:52:53 +0000 | |
commit | 89868e068aa65a752341f79174610c38a24806bd (patch) | |
tree | ef34c3a18a7a36828d4fb7d0d7c1d301391b22b0 /sys/netinet/ip_icmp.c | |
parent | addition for 64bit time_t (diff) | |
download | wireguard-openbsd-89868e068aa65a752341f79174610c38a24806bd.tar.xz wireguard-openbsd-89868e068aa65a752341f79174610c38a24806bd.zip |
When net.inet.ip.sourceroute is enable, store the source route
of incoming IPv4 packets with the SSRR or LSRR header option in
a m_tag rather than in a single static entry.
Use a new m_tag type, PACKET_TAG_SRCROUTE, for this and bump
PACKET_TAG_MAXSIZE accordingly.
Adapted from FreeBSD r135274 with inputs from bluhm@.
ok bluhm@, mikeb@
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 91d8213b45e..4d427e201b5 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.104 2013/08/08 14:59:22 mpi Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.105 2013/08/13 09:52:53 mpi Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -745,7 +745,7 @@ icmp_reflect(struct mbuf *m, struct mbuf **op, struct in_ifaddr *ia) * add on any record-route or timestamp options. */ cp = (u_char *) (ip + 1); - if (op && (opts = ip_srcroute()) == 0 && + if (op && (opts = ip_srcroute(m)) == NULL && (opts = m_gethdr(M_DONTWAIT, MT_HEADER))) { opts->m_len = sizeof(struct in_addr); mtod(opts, struct in_addr *)->s_addr = 0; |