summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_icmp.c
diff options
context:
space:
mode:
authorCedric Berger <cedric@cvs.openbsd.org>2004-06-06 16:49:10 +0000
committerCedric Berger <cedric@cvs.openbsd.org>2004-06-06 16:49:10 +0000
commit9e25ab1fcd3c8a3b75b6ae3c7ca26a172a86d2e8 (patch)
tree021044703db486221cd747d714184ece1513b162 /sys/netinet/ip_icmp.c
parentac4791c970556454694a0c9ab754ea95de5b9bc1 (diff)
extend routing table to be able to match and route packets based on
their *source* IP address in addition to their destination address. routing table "destination" now contains a "struct sockaddr_rtin" for IPv4 instead of a "struct sockaddr_in". the routing socket has been extended in a backward-compatible way. todo: PMTU enhancements, IPv6. ok deraadt@ mcbride@
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r--sys/netinet/ip_icmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 01008af1c97..15cf7cd391c 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.63 2004/04/26 01:47:24 deraadt Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.64 2004/06/06 16:49:09 cedric Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -564,7 +564,7 @@ reflect:
icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
rt = NULL;
rtredirect(sintosa(&icmpsrc), sintosa(&icmpdst),
- (struct sockaddr *)0, RTF_GATEWAY | RTF_HOST,
+ (struct sockaddr *)&rt_defmask4, RTF_GATEWAY | RTF_HOST,
sintosa(&icmpgw), (struct rtentry **)&rt);
if (rt != NULL && icmp_redirtimeout != 0) {
(void)rt_timer_add(rt, icmp_redirect_timeout,
@@ -850,7 +850,7 @@ icmp_mtudisc_clone(struct sockaddr *dst)
error = rtrequest((int) RTM_ADD, dst,
(struct sockaddr *) rt->rt_gateway,
- (struct sockaddr *) 0,
+ sroute_clone_mask4(rt_mask(rt), NULL),
RTF_GATEWAY | RTF_HOST | RTF_DYNAMIC, &nrt);
if (error) {
rtfree(rt);