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_fastfwd.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_fastfwd.c')
-rw-r--r-- | sys/netinet/ip_fastfwd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 0381d5f..383436f 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -137,7 +137,7 @@ ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) ipstat.ips_cantforward++; if (rt) RTFREE(rt); - icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, NULL); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); return NULL; } return dst; @@ -297,7 +297,7 @@ ip_fastforward(struct mbuf *m) return 0; else if (ip_doopts == 2) { icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_FILTER_PROHIB, - 0, NULL); + 0, 0); return 1; } /* else ignore IP options and continue */ @@ -407,7 +407,7 @@ passin: if (!ipstealth) { #endif if (ip->ip_ttl <= IPTTLDEC) { - icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0, NULL); + icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0, 0); return 1; } @@ -512,7 +512,7 @@ passout: */ if ((ro.ro_rt->rt_flags & RTF_REJECT) && ro.ro_rt->rt_rmx.rmx_expire >= time_second) { - icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, NULL); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); goto consumed; } @@ -532,7 +532,7 @@ passout: * Check if media link state of interface is not down */ if (ifp->if_link_state == LINK_STATE_DOWN) { - icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, NULL); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); goto consumed; } @@ -563,7 +563,7 @@ passout: if (ip->ip_off & IP_DF) { ipstat.ips_cantfrag++; icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, - 0, ifp); + 0, mtu); goto consumed; } else { /* |