From 2e77d270c1bcf6a24dc17a8b27e844f36a8ddd54 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Thu, 29 Dec 2016 19:57:46 +0000 Subject: [PATCH] When we are sending IP fragments, update ip pointers in IP_PROBE() for each fragment. MFC after: 1 week --- sys/netinet/ip_fastfwd.c | 5 +++-- sys/netinet/ip_output.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index b4507a91b313..c0c618680b23 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -400,8 +400,9 @@ ip_tryforward(struct mbuf *m) */ m_clrprotoflags(m); - IP_PROBE(send, NULL, NULL, ip, nh.nh_ifp, - ip, NULL); + IP_PROBE(send, NULL, NULL, + mtod(m, struct ip *), nh.nh_ifp, + mtod(m, struct ip *), NULL); /* XXX: we can use cached route here */ error = (*nh.nh_ifp->if_output)(nh.nh_ifp, m, (struct sockaddr *)&dst, NULL); diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 352aa375c770..78a5cc37f032 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -696,7 +696,8 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags, */ m_clrprotoflags(m); - IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); + IP_PROBE(send, NULL, NULL, mtod(m, struct ip *), ifp, + mtod(m, struct ip *), NULL); error = (*ifp->if_output)(ifp, m, (const struct sockaddr *)gw, ro); } else