summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2005-07-31 03:30:56 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2005-07-31 03:30:56 +0000
commit572772cf7ccf3f3860c0121c89ee22e0001d0692 (patch)
tree610ab2d75d296c730135e6ff5a6fc7544b6f5bf0 /sys/net/pf.c
parent2c25fdbabd0951de2d2c84e82326825b902ced70 (diff)
Change the API for icmp_do_error so that it takes the mtu directly, rather
than a pointer to struct ifnet containing it. Saves a 448 byte stack allocation in ip_forward which previously faked up a struct ifnet just for this purpose. idea ok deraadt millert
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 6d9e3583d21..c2f29bb30d5 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.496 2005/07/29 06:26:43 pascoe Exp $ */
+/* $OpenBSD: pf.c,v 1.497 2005/07/31 03:30:55 pascoe Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1638,7 +1638,7 @@ pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af,
switch (af) {
#ifdef INET
case AF_INET:
- icmp_error(m0, type, code, 0, (void *)NULL);
+ icmp_error(m0, type, code, 0, 0);
break;
#endif /* INET */
#ifdef INET6
@@ -5415,7 +5415,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
ipstat.ips_cantfrag++;
if (r->rt != PF_DUPTO) {
icmp_error(m0, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0,
- ifp);
+ ifp->if_mtu);
goto done;
} else
goto bad;