The NetBSD Project

CVS log for src/sys/net/rtsock_shared.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 4 07:06:31 2022 UTC (16 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Fix comment (!COMPAT_RTSOCK case). No functional change.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jul 1 21:22:23 2022 UTC (20 months ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.21: +13 -12 lines
Diff to previous 1.21 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jun 29 23:15:08 2022 UTC (20 months ago) by riastradh
Branch: MAIN
Changes since 1.20: +5 -6 lines
Diff to previous 1.20 (colored)

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

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 26 21:42:19 2022 UTC (20 months ago) by riastradh
Branch: MAIN
Changes since 1.19: +10 -4 lines
Diff to previous 1.19 (colored)

route(4): Avoid unaligned access to struct rt_msghdr.

Reported-by: syzbot+e0048186a5cc97b1c5a6@syzkaller.appspotmail.com

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jun 26 15:53:59 2020 UTC (3 years, 8 months ago) by roy
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.18: +5 -4 lines
Diff to previous 1.18 (colored)

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.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jun 24 12:27:51 2020 UTC (3 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.17: +12 -5 lines
Diff to previous 1.17 (colored)

Ensure sockaddrs have valid lengths for RO_MISSFILTER.

Thanks to maxv@ for spotting this.

Revision 1.9.2.4 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:15 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.9.2.3: +9 -0 lines
Diff to previous 1.9.2.3 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.9.2.3 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:57 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.9.2.2: +89 -12 lines
Diff to previous 1.9.2.2 (colored) to branchpoint 1.9 (colored)

Merge changes from current as of 20200406

Revision 1.17 / (download) - annotate - [select for diffs], Fri Mar 13 16:37:12 2020 UTC (3 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

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.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Mar 12 19:36:33 2020 UTC (3 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.15: +6 -6 lines
Diff to previous 1.15 (colored)

move debugging code after the NULL check.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:06 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.11: +83 -6 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Sync with head.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Feb 22 09:30:42 2020 UTC (4 years ago) by maxv
Branch: MAIN
CVS Tags: ad-namecache-base3
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

pass the address of the field, instead of relying on it being the first
field of the structure, no functional change

Revision 1.14 / (download) - annotate - [select for diffs], Sun Feb 9 21:15:03 2020 UTC (4 years ago) by roy
Branch: MAIN
Changes since 1.13: +17 -4 lines
Diff to previous 1.13 (colored)

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.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Feb 8 14:17:30 2020 UTC (4 years ago) by roy
Branch: MAIN
Changes since 1.12: +69 -5 lines
Diff to previous 1.12 (colored)

route(4): add RO_MISSFILTER socket option

This allows filtering of specific RTM_MISS destination sockaddrs.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jan 29 04:35:13 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Do not reference ifp->if_data directly; use if_export_if_data().

Revision 1.11 / (download) - annotate - [select for diffs], Mon Oct 14 16:43:04 2019 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.10: +4 -2 lines
Diff to previous 1.10 (colored)

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

Revision 1.9.4.1 / (download) - annotate - [select for diffs], Mon Sep 30 15:55:40 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.9: +9 -2 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

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

Revision 1.10 / (download) - annotate - [select for diffs], Mon Aug 19 03:23:30 2019 UTC (4 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.9: +9 -2 lines
Diff to previous 1.9 (colored)

Initialize dom_mowner for MBUFTRACE

Revision 1.9.2.2 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:45 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.9.2.1: +1701 -0 lines
Diff to previous 1.9.2.1 (colored) to branchpoint 1.9 (colored)

Sync with HEAD

Revision 1.9.2.1, Fri May 3 02:10:58 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.9: +0 -1701 lines
FILE REMOVED

file rtsock_shared.c was added on branch phil-wifi on 2019-06-10 22:09:45 +0000

Revision 1.9 / (download) - annotate - [select for diffs], Fri May 3 02:10:58 2019 UTC (4 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base
Branch point for: phil-wifi, netbsd-9
Changes since 1.8: +2 -4 lines
Diff to previous 1.8 (colored)

Only initialize the NET_MPSAFE stuff once, for the non-compat version
of route_init().

Revision 1.8 / (download) - annotate - [select for diffs], Mon Apr 29 16:12:30 2019 UTC (4 years, 10 months ago) by roy
Branch: MAIN
Changes since 1.7: +23 -6 lines
Diff to previous 1.7 (colored)

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.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Apr 29 11:57:22 2019 UTC (4 years, 10 months ago) by roy
Branch: MAIN
Changes since 1.6: +11 -4 lines
Diff to previous 1.6 (colored)

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.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Apr 29 05:42:09 2019 UTC (4 years, 10 months ago) by pgoyette
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

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.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 10 04:06:52 2019 UTC (4 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.4: +6 -4 lines
Diff to previous 1.4 (colored)

Avoid a maybe-uninitialized warning by checking for an error return
that might indicate that 'len' was not initialized.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Mar 1 11:06:57 2019 UTC (5 years ago) by pgoyette
Branch: MAIN
Changes since 1.3: +6 -6 lines
Diff to previous 1.3 (colored)

Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 29 09:28:51 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: MAIN
Changes since 1.2: +9 -9 lines
Diff to previous 1.2 (colored)

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.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:48 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: MAIN
Changes since 1.1: +1677 -0 lines
Diff to previous 1.1 (colored)

Merge the [pgoyette-compat] branch

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Tue Jan 22 07:42:41 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.1.2.6: +8 -47 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

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 {}.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 06:49:28 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.5: +10 -10 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored)

No need to declare the hook_call() function for void hooks.  So
remove and simplify.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Fri Jan 18 00:01:02 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.4: +5 -5 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

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).

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Tue Jan 15 22:28:15 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.3: +2 -4 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

More #include removal

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Tue Jan 15 04:10:34 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.2: +6 -14 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

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.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Jan 15 03:40:35 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.1: +12 -13 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

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.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Tue Jan 15 01:16:42 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1: +1727 -0 lines
Diff to previous 1.1 (colored)

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

Revision 1.1, Tue Jan 15 01:16:42 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118
Branch point for: pgoyette-compat
FILE REMOVED

file rtsock_shared.c was initially added on branch pgoyette-compat.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>