On Wed, Jul 04, 2018 at 11:51:46PM +0200, Sebastian Benoit wrote:
> Remi noticed that ospfd does no longer see new interfaces.
> 
> The priority filter should only work on routing messages that
> have a rtm_priority.
> 
> So these are out:
> 
> RTM_DELADDR
> RTM_NEWADDR (struct ifa_msghdr)
> RTM_IFINFO (struct if_msghdr)
> RTM_IFANNOUNCE (struct if_announcemsghdr)
> RTM_BFD (struct bfd_msghdr)
> 
> and all others (struct rt_msghdr) are ok and handled in the default case
> further down.
> 
> Move the rop_priority check there.
> 
> ok?

RTM_BFD is not handled by the switch() and neither is RTM_INVALIDATE.
Now RTM_INVALIDATE is only internally used but RTM_BFD should be added
to the RTM_RESOLVE case.

With that OK claudio@
 
> diff --git sys/net/rtsock.c sys/net/rtsock.c
> index afab5d72505..4d3442d0924 100644
> --- sys/net/rtsock.c
> +++ sys/net/rtsock.c
> @@ -465,9 +465,6 @@ next:
>               if (rtm->rtm_type != RTM_DESYNC && rop->rop_msgfilter != 0 &&
>                   !(rop->rop_msgfilter & (1 << rtm->rtm_type)))
>                       goto next;
> -             if (rop->rop_priority != 0 &&
> -                 rop->rop_priority < rtm->rtm_priority)
> -                     goto next;
>               switch (rtm->rtm_type) {
>               case RTM_IFANNOUNCE:
>               case RTM_DESYNC:
> @@ -483,6 +480,9 @@ next:
>                               goto next;
>                       break;
>               default:
> +                     if (rop->rop_priority != 0 &&
> +                         rop->rop_priority < rtm->rtm_priority)
> +                             goto next;
>                       /* check against rtable id */
>                       if (rop->rop_rtableid != RTABLE_ANY &&
>                           rop->rop_rtableid != rtm->rtm_tableid)
> 

-- 
:wq Claudio

Reply via email to