Re: [Patch] Add rtlabel to rt_newaddrmsg
On Tue, Feb 11, 2014 at 09:07:04PM +0100, Florian Riehm wrote: Hi tech@, I'm using the ospfd with redistribute rtlabel statements. If I add new addresses to interfaces with a route label, ospfd will not notice it, because the route messages don't contain the route label. Please have a look to the attached patch. It adds the route label, so ospfd can handle it properly. Makes sense to me, OK bluhm@ Regards, florian Index: rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.137 diff -u -p -r1.137 rtsock.c --- rtsock.c22 Jan 2014 06:28:09 - 1.137 +++ rtsock.c11 Feb 2014 19:43:17 - @@ -1193,12 +1193,15 @@ rt_newaddrmsg(int cmd, struct ifaddr *if if ((cmd == RTM_ADD pass == 2) || (cmd == RTM_DELETE pass == 1)) { struct rt_msghdr *rtm; + struct sockaddr_rtlabel sa_rl; if (rt == 0) continue; info.rti_info[RTAX_NETMASK] = rt_mask(rt); info.rti_info[RTAX_DST] = sa = rt_key(rt); info.rti_info[RTAX_GATEWAY] = rt-rt_gateway; + info.rti_info[RTAX_LABEL] = + rtlabel_id2sa(rt-rt_labelid, sa_rl); if ((m = rt_msg1(cmd, info)) == NULL) continue; rtm = mtod(m, struct rt_msghdr *);
Re: [Patch] Add rtlabel to rt_newaddrmsg
On Tue, Feb 11, 2014 at 09:07:04PM +0100, Florian Riehm wrote: Hi tech@, I'm using the ospfd with redistribute rtlabel statements. If I add new addresses to interfaces with a route label, ospfd will not notice it, because the route messages don't contain the route label. Please have a look to the attached patch. It adds the route label, so ospfd can handle it properly. Makes sense to me. OK. Index: rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.137 diff -u -p -r1.137 rtsock.c --- rtsock.c22 Jan 2014 06:28:09 - 1.137 +++ rtsock.c11 Feb 2014 19:43:17 - @@ -1193,12 +1193,15 @@ rt_newaddrmsg(int cmd, struct ifaddr *if if ((cmd == RTM_ADD pass == 2) || (cmd == RTM_DELETE pass == 1)) { struct rt_msghdr *rtm; + struct sockaddr_rtlabel sa_rl; if (rt == 0) continue; info.rti_info[RTAX_NETMASK] = rt_mask(rt); info.rti_info[RTAX_DST] = sa = rt_key(rt); info.rti_info[RTAX_GATEWAY] = rt-rt_gateway; + info.rti_info[RTAX_LABEL] = + rtlabel_id2sa(rt-rt_labelid, sa_rl); if ((m = rt_msg1(cmd, info)) == NULL) continue; rtm = mtod(m, struct rt_msghdr *); -- :wq Claudio