FreeBSD Bugzilla – Attachment 93595 Details for
Bug 131536
[netinet] [patch] kernel does allow manipulation of subnet routes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 2.18 KB, created by
roy
on 2009-02-09 17:10:01 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
roy
Created:
2009-02-09 17:10:01 UTC
Size:
2.18 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># rtsock.diff ># in.diff ># >echo x - rtsock.diff >sed 's/^X//' >rtsock.diff << '4db83498abbda21a07ce620dbb9f4808' >X--- sys/net/rtsock.c.orig 2009-02-09 11:16:58.000000000 +0000 >X+++ sys/net/rtsock.c 2009-02-09 16:47:45.000000000 +0000 >X@@ -315,7 +315,7 @@ >X struct rtentry *rt = NULL; >X struct radix_node_head *rnh; >X struct rt_addrinfo info; >X- int len, error = 0; >X+ int len, error = 0, ifa_route = 0; >X struct ifnet *ifp = NULL; >X struct sockaddr_in jail; >X >X@@ -404,6 +404,9 @@ >X if (error == 0) { >X RT_LOCK(saved_nrt); >X rt = saved_nrt; >X+ if (rt->rt_ifa != NULL && >X+ rt->rt_ifa->ifa_flags & IFA_ROUTE) >X+ rt->rt_ifa->ifa_flags &= ~IFA_ROUTE; >X goto report; >X } >X break; >X@@ -516,6 +519,12 @@ >X senderr(error); >X RT_LOCK(rt); >X } >X+ if (rt->rt_ifa != NULL && >X+ rt->rt_ifa->ifa_flags & IFA_ROUTE) >X+ { >X+ rt->rt_ifa->ifa_flags &= ~IFA_ROUTE; >X+ ifa_route = 1; >X+ } >X if (info.rti_ifa != NULL && >X info.rti_ifa != rt->rt_ifa && >X rt->rt_ifa != NULL && >X@@ -544,6 +553,10 @@ >X rt->rt_flags = (rt->rt_flags & >X ~rtm->rtm_fmask) | >X (rtm->rtm_flags & rtm->rtm_fmask); >X+ if (ifa_route && >X+ rt->rt_ifa != NULL && >X+ !(rt->rt_flags & RTF_STATIC)) >X+ rt->rt_ifa->ifa_flags |= IFA_ROUTE; >X rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx, >X &rt->rt_rmx); >X rtm->rtm_index = rt->rt_ifp->if_index; >4db83498abbda21a07ce620dbb9f4808 >echo x - in.diff >sed 's/^X//' >in.diff << '4fc6bf5d423ec08741fa36740ccce5fd' >X--- sys/netinet/in.c.orig 2009-02-09 16:49:43.000000000 +0000 >X+++ sys/netinet/in.c 2009-02-09 11:42:40.000000000 +0000 >X@@ -858,6 +858,12 @@ >X error = rtinit(&target->ia_ifa, (int)RTM_ADD, flags); >X if (!error) >X target->ia_flags |= IFA_ROUTE; >X+ else if (error == EEXIST) { >X+ /* >X+ * The fact that the route already exists is not an error >X+ */ >X+ error = 0; >X+ } >X return error; >X } >X >4fc6bf5d423ec08741fa36740ccce5fd >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 131536
: 93595