tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: COMPAT_50 vs NET_RT_IFLIST



    Date:        Thu, 2 May 2019 09:57:41 +0800 (PST)
    From:        Paul Goyette <paul%whooppee.com@localhost>
    Message-ID:  <Pine.NEB.4.64.1905020754050.6915%speedy.whooppee.com@localhost>


  | This second breakage was introduced between 2017-04-11 at 13:50 UTC 
  | (working) and 2017-04-11 at 14:00 UTC (broken).  During that interval
  | there was only one commit:
  |
  |  	Module Name:    src
  |  	Committed By:   roy
  |  	Date:           Tue Apr 11 13:55:55 UTC 2017
  |
  |  	Modified Files:
  |  		src/share/man/man4: route.4
  |  		src/sys/net: raw_cb.h raw_usrreq.c route.h rtsock.c
  |
  |  	Log Message:
  |  	Add RO_MSGFILTER socket option to PF_ROUTE to filter out
  |  	un-wanted route(4) messages.

This one looks straightforward II think) ... the filter is enabled
by default, and drops everything that is not (new version) routing
message (which is all it knows how to examine).

Anything from COMPAT_50 (or earlier) will simply be discarded it
appears.

This should be easy to fix by just adding a new filter function, and
apply it when a COMPAT_50 (or older) routing socket is opened.
(It might be COMPAT_RTSOCK that really makes the difference here.)
The new function could simply OK all packets (which matches pre
NetBSD-8 behaviour) or could do the same kinds of tests as the
current one.

Alternately - only enable the filter for sockets for the new protocol,
and leave it turned off for the old ones.

How to fit that kind of change into the new modularised COMPAT_* stuff
I have no idea however.

kre



Home | Main Index | Thread Index | Old Index