diff options
| author | Oleg Bulyzhin <oleg@FreeBSD.org> | 2006-01-24 13:38:06 +0000 |
|---|---|---|
| committer | Oleg Bulyzhin <oleg@FreeBSD.org> | 2006-01-24 13:38:06 +0000 |
| commit | 44a515834f3c85533d590a7e6655fbcc62809ee6 (patch) | |
| tree | af2cb328702ac541b3e4acdde7d2b25bb36b3102 | |
| parent | 634c377652cd8446cd91c44eb0920b4fdecb0e1d (diff) | |
Notes
| -rw-r--r-- | sys/netinet/ip_fw2.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 79e0e2b80f1e..e28695198c73 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -545,8 +545,14 @@ verify_path(struct in_addr src, struct ifnet *ifp) if (ro.ro_rt == NULL) return 0; - /* if ifp is provided, check for equality with rtentry */ - if (ifp != NULL && ro.ro_rt->rt_ifp != ifp) { + /* + * If ifp is provided, check for equality with rtentry. + * We should use rt->rt_ifa->ifa_ifp, instead of rt->rt_ifp, + * in order to pass packets injected back by if_simloop(): + * if useloopback == 1 routing entry (via lo0) for our own address + * may exist, so we need to handle routing assymetry. + */ + if (ifp != NULL && ro.ro_rt->rt_ifa->ifa_ifp != ifp) { RTFREE(ro.ro_rt); return 0; } |
