diff options
author | andre <andre@FreeBSD.org> | 2005-05-04 13:09:19 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2005-05-04 13:09:19 +0000 |
commit | e6d10efc2a28df376035767e5e60dc1a717178c1 (patch) | |
tree | df78b85af4d568fda8517c5409445b468d558251 /sys/netinet/ip_icmp.c | |
parent | c9c0d4d0d6f2957fc31eff768b148f2b7bd0055a (diff) | |
download | FreeBSD-src-e6d10efc2a28df376035767e5e60dc1a717178c1.zip FreeBSD-src-e6d10efc2a28df376035767e5e60dc1a717178c1.tar.gz |
Pass icmp_error() the MTU argument directly instead of
an interface pointer. This simplifies a couple of uses
and removes some XXX workarounds.
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index c57b684..603588f 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -133,11 +133,11 @@ extern struct protosw inetsw[]; * in response to bad packet ip. */ void -icmp_error(n, type, code, dest, destifp) +icmp_error(n, type, code, dest, mtu) struct mbuf *n; int type, code; n_long dest; - struct ifnet *destifp; + int mtu; { register struct ip *oip = mtod(n, struct ip *), *nip; register unsigned oiplen = oip->ip_hl << 2; @@ -201,8 +201,8 @@ icmp_error(n, type, code, dest, destifp) icp->icmp_pptr = code; code = 0; } else if (type == ICMP_UNREACH && - code == ICMP_UNREACH_NEEDFRAG && destifp) { - icp->icmp_nextmtu = htons(destifp->if_mtu); + code == ICMP_UNREACH_NEEDFRAG && mtu) { + icp->icmp_nextmtu = htons(mtu); } } |