Home | History | Annotate | Download | only in net
History log of /src/sys/net/rtsock_shared.c
RevisionDateAuthorComments
 1.23  04-Oct-2022  msaitoh Fix comment (!COMPAT_RTSOCK case). No functional change.
 1.22  01-Jul-2022  riastradh route(4): Use m_copydata, not misaligned mtod struct access.

XXX Maybe this should check rtm_len too like route_output does.

Reported-by: syzbot+d37eaf0a26097572bbbc@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=3cdfefd8b7938c9606ed68b4191e97fabdbd7b08
 1.21  29-Jun-2022  riastradh route(4): Avoid unaligned access to struct rt_msghdr, take two.

Can't even take the address of the misaligned struct member for
memcpy. Just copy the header out into a stack variable instead.

Reported-by: syzbot+083d9be5cb3c2e78ed1c@syzkaller.appspotmail.com
 1.20  26-Jun-2022  riastradh route(4): Avoid unaligned access to struct rt_msghdr.

Reported-by: syzbot+e0048186a5cc97b1c5a6@syzkaller.appspotmail.com
 1.19  26-Jun-2020  roy Adjust prior to enforce minimum socket length includes sa_family

Not that the code strictly needs it, but if the macro is ever used
elsewhere then it makes sense as every sockaddr must have it.
The rest of the structure is dictated by the family and in some cases,
truncated on purpose so this is fine.
 1.18  24-Jun-2020  roy Ensure sockaddrs have valid lengths for RO_MISSFILTER.

Thanks to maxv@ for spotting this.
 1.17  13-Mar-2020  christos Use the socket credentials that are established during the socket creation
instead of the current process credentials (which can change via
set{e,}{u,g}id(2)) and by passing the fd to a different process. This makes
the routing socket behave like other file descriptors. Proposed in tech-kern.
 1.16  12-Mar-2020  christos move debugging code after the NULL check.
 1.15  22-Feb-2020  maxv pass the address of the field, instead of relying on it being the first
field of the structure, no functional change
 1.14  09-Feb-2020  roy route(4): dst addr could be in a different mbuf for RO_MISSFILTER

While here, the correct assertation is RTAX_DST == 0.
RTA_DST is just a flag.
 1.13  08-Feb-2020  roy route(4): add RO_MISSFILTER socket option

This allows filtering of specific RTM_MISS destination sockaddrs.
 1.12  29-Jan-2020  thorpej Do not reference ifp->if_data directly; use if_export_if_data().
 1.11  14-Oct-2019  maxv branches: 1.11.2;
Error out if the type is beyond the storage size. No functional change,
since the shift would otherwise 'and' against zero, returning EEXIST.

Reported-by: syzbot+cb68ccdc1ef3aca2d679@syzkaller.appspotmail.com
 1.10  19-Aug-2019  ozaki-r Initialize dom_mowner for MBUFTRACE
 1.9  03-May-2019  pgoyette branches: 1.9.2; 1.9.4;
Only initialize the NET_MPSAFE stuff once, for the non-compat version
of route_init().
 1.8  29-Apr-2019  roy Introduce rt_addrmsg_src which adds RTA_AUTHOR to the message.
Use this when we notify userland of a duplicate address
and set RTA_AUTHOR to the hardware address of the sender.

While here, match the logging diagnostic of INET6 to the simpler one
of INET so it's consistent.
 1.7  29-Apr-2019  roy rtsock: Route address message simplification

Rename rt_newaddrmsg to rt_addrmsg_rt.
Add rt_addrmsg which drops the error and route arguments which are only
needed by one caller.
 1.6  29-Apr-2019  pgoyette For the rtsock compat code, make sure we create the "oroute" sysctl
tree. Otherwise a 5.2 version of getifaddrs(2) gets errors.

This makes the 5.2 version of ifconfig(8) behave the same on both
NetBSD-8 and -current. HOWEVER, both of them print nothing (for
``ifconfig -l'' command) so there's still a bug somewhere.

As reported originally by der Mouse.
 1.5  10-Apr-2019  thorpej Avoid a maybe-uninitialized warning by checking for an error return
that might indicate that 'len' was not initialized.
 1.4  01-Mar-2019  pgoyette Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.
 1.3  29-Jan-2019  pgoyette Normalize all the compat hooks' names to the form

<subsystem>_<function>_<version>_hook

NFCI

XXX Note that although this introduces a change in the kernel-to-
XXX module interface, we are NOT bumping the kernel version number.
XXX We will bump the version number once the interface stabilizes.
 1.2  27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.1  15-Jan-2019  pgoyette branches: 1.1.2;
file rtsock_shared.c was initially added on branch pgoyette-compat.
 1.1.2.7  22-Jan-2019  pgoyette Convert the MODULE_{,VOID_}HOOK_CALL macros to do everything in-line
rather than defining an intermediate hook##call function. Almost
all of the hooks are called only once, and although we lose the
ability of doing things like

if (MODULE_HOOK_CALL(...) == 0) ...

we simplify things quite a bit. With this change, we no longer need
to have both declaration and definition macros, and the definition
no longer needs to have both prototype argument list and a "real"
argument list.

FWIW, the above if now needs to written as

int ret;

MODULE_HOOK_CALL(..., ret);
if (ret == 0) ...

with appropriate use of braces {}.
 1.1.2.6  21-Jan-2019  pgoyette No need to declare the hook_call() function for void hooks. So
remove and simplify.
 1.1.2.5  18-Jan-2019  pgoyette Don't restrict hooks to having only int or void types. Pass the hook's
type to the various macros, as needed.

Allows us to reduce diffs to original in at least one or two places (we
no longer have to provide an additional parameter to the hook routine
for returning a non-int return value).
 1.1.2.4  15-Jan-2019  pgoyette More #include removal
 1.1.2.3  15-Jan-2019  pgoyette Add vectors for sctp_{add,delete}_ipaddr() so we can check them
in rtsock.c rather than depending on the SCTP kernel compile
option. This is similar to what was done previously with NTP.
 1.1.2.2  15-Jan-2019  pgoyette Split sys/net/rtsock.c into two pieces, one of which is applicable only
to -current and one which is shared between -current and COMPAT_50.
 1.1.2.1  15-Jan-2019  pgoyette First pass at extracting the "shared" compat code into its own source
file, rather than burying it in sys/net/rtsock.c and conditionalizing
various pieces.

XXX Not yet used - it will eventually be #include-d by sys/net/rtsock.c
XXX and compat/common/rtsock_50.c
 1.9.4.1  30-Sep-2019  martin Pull up following revision(s) (requested by ozaki-r in ticket #269):

sys/netinet6/nd6.h: revision 1.88
sys/net/rtsock_shared.c: revision 1.10
sys/netinet6/nd6_nbr.c: revision 1.174
sys/netinet6/nd6.c: revision 1.264
sys/netinet/if_arp.c: revision 1.283
sys/netinet/if_arp.c: revision 1.288

Initialize DAD components properly

The original code initialized each component in non-init functions such as
arp_dad_start and nd6_dad_find, conditionally based on a global flag for each.
However, it was racy because the flag and the code around it were not
protected by a lock and could cause a kernel panic at worst.

Fix the issue by initializing the components in bootup as usual.

-

Initialize dom_mowner for MBUFTRACE
 1.9.2.4  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9.2.3  08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.2.2  10-Jun-2019  christos Sync with HEAD
 1.9.2.1  03-May-2019  christos file rtsock_shared.c was added on branch phil-wifi on 2019-06-10 22:09:45 +0000
 1.11.2.1  29-Feb-2020  ad Sync with head.

RSS XML Feed