Unix Technical Forum

PATCH: allow urpf to work on addressless carps

This is a discussion on PATCH: allow urpf to work on addressless carps within the mailing.openbsd.tech forums, part of the OpenBSD category; --> hi tech, This small diff does an additionnal check in pf_routable(), If urpf failed and the interface the route ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:59 AM
Pierre-Yves Ritschard
 
Posts: n/a
Default PATCH: allow urpf to work on addressless carps

hi tech,

This small diff does an additionnal check in pf_routable(),
If urpf failed and the interface the route is on is a carp interface,
then check wether the interface the packet was seen on is the carpdev of
the interface.

This allows carps on addressless interfaces (well it would work for
carps on interfaces which are on a different network too).

This was discussed with mcbride who thinks this might involve doing more
stuff, it works on my test machine.

Index: pf.c
================================================== =================
RCS file: /space/release/cvs/src/sys/net/pf.c,v
retrieving revision 1.518
diff -u -r1.518 pf.c
--- pf.c 31 Oct 2006 14:49:01 -0000 1.518
+++ pf.c 16 Nov 2006 16:18:04 -0000
@@ -5417,6 +5417,15 @@
if (kif != NULL && (kif->pfik_ifp == NULL ||
kif->pfik_ifp != ro.ro_rt->rt_ifp))
ret = 0;
+ /*
+ * If the interface is a carp one see if the packet was
+ * seen on the underlying interface
+ */
+ if (kif != NULL && ret == 0) {
+ if (ro.ro_rt->rt_ifp->if_type == IFT_CARP &&
+ ro.ro_rt->rt_ifp->if_carpdev == kif->pfik_ifp)
+ ret = 1;
+ }
RTFREE(ro.ro_rt);
} else
ret = 0;

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:19 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com