summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_options.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-10-12 09:24:24 +0000
committerglebius <glebius@FreeBSD.org>2012-10-12 09:24:24 +0000
commit9879a454afa69e2734e4833c1af50019f15df7e6 (patch)
tree1598085a4c5d301498cab2e57c98649ad6856253 /sys/netinet/ip_options.c
parent1f46bef563e94fd201aab281f16815e590ba45c6 (diff)
downloadFreeBSD-src-9879a454afa69e2734e4833c1af50019f15df7e6.zip
FreeBSD-src-9879a454afa69e2734e4833c1af50019f15df7e6.tar.gz
In ip_stripoptions():
- Remove unused argument and incorrect comment. - Fixup ip_len after stripping.
Diffstat (limited to 'sys/netinet/ip_options.c')
-rw-r--r--sys/netinet/ip_options.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c
index 53ba713..b618445 100644
--- a/sys/netinet/ip_options.c
+++ b/sys/netinet/ip_options.c
@@ -453,14 +453,10 @@ ip_srcroute(struct mbuf *m0)
}
/*
- * Strip out IP options, at higher level protocol in the kernel. Second
- * argument is buffer to which options will be moved, and return value is
- * their length.
- *
- * XXX should be deleted; last arg currently ignored.
+ * Strip out IP options, at higher level protocol in the kernel.
*/
void
-ip_stripoptions(struct mbuf *m, struct mbuf *mopt)
+ip_stripoptions(struct mbuf *m)
{
int i;
struct ip *ip = mtod(m, struct ip *);
@@ -476,6 +472,7 @@ ip_stripoptions(struct mbuf *m, struct mbuf *mopt)
m->m_pkthdr.len -= olen;
ip->ip_v = IPVERSION;
ip->ip_hl = sizeof(struct ip) >> 2;
+ ip->ip_len -= olen;
}
/*
OpenPOWER on IntegriCloud