From 572772cf7ccf3f3860c0121c89ee22e0001d0692 Mon Sep 17 00:00:00 2001 From: Christopher Pascoe Date: Sun, 31 Jul 2005 03:30:56 +0000 Subject: 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 --- sys/net/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/net/pf.c') 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; -- cgit v1.2.3