The NetBSD Project

CVS log for src/sys/netinet6/sctp6_usrreq.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Jul 6 10:09:15 2024 UTC (4 months, 4 weeks ago) by andvar
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +5 -5 lines
Fix various typos in comments:
s/defininitions/definitions/
s/ininitialise/initialise/
s/collasped/collapsed/
s/optionaly/optionally/

Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Jul 5 04:31:54 2024 UTC (5 months ago) by rin
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +10 -20 lines
sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:01:53 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
inpcb: rename functions to in6pcb_*

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Oct 28 05:26:29 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -7 lines
Adjust dccp and sctp for struct inpcb separation

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Apr 27 19:33:48 2020 UTC (4 years, 7 months ago) by rjs
Branches: 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, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -5 lines
Call IPv4 handler for accept().

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Apr 27 19:21:43 2020 UTC (4 years, 7 months ago) by rjs
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +22 -12 lines
Do sctp_connectx() handling using ioctl() for IPv6 as well.

Revision 1.16.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:17 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.16.2.1: preferred, colored; branchpoint 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.2.1: +3 -2 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Jun 25 15:33:56 2019 UTC (5 years, 5 months ago) by rjs
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -2 lines
Split out the prototypes for add/delete address into a separate header file.

Revision 1.16.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:48 2019 UTC (5 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +12 -6 lines
Sync with HEAD

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Feb 25 06:49:44 2019 UTC (5 years, 9 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20190609, isaki-audio2-base, isaki-audio2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +5 -2 lines
RIP6, CAN, SCTP and SCTP6 lack a length check in their _send() functions.
Fix RIP6 and CAN, add a big XXX in the SCTP ones.

Found by KASAN, triggered by SyzKaller.

Reported-by: syzbot+0b9692ae0f49f93b7dc7@syzkaller.appspotmail.com

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Feb 24 07:20:33 2019 UTC (5 years, 9 months ago) by maxv
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +7 -2 lines
RIP, RIP6, DDP, SCTP and SCTP6 lack a length check in their _connect()
functions. Fix the first three, and add a big XXX in the SCTP ones.

Found by KASAN, triggered by SyzKaller.

Reported-by: syzbot+9eaf98dad6ca738c250d@syzkaller.appspotmail.com

Revision 1.13.4.1: download - view: text, markup, annotated - select for diffs
Tue Jan 29 07:04:09 2019 UTC (5 years, 10 months ago) by msaitoh
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13: +4 -6 lines
Pull up following revision(s) (requested by martin in ticket #1175):
sys/net/link_proto.c				1.37
sys/netatalk/ddp_usrreq.c			1.72
sys/netbt/hci_socket.c				1.46
sys/netbt/l2cap_socket.c			1.36
sys/netbt/rfcomm_socket.c			1.38
sys/netbt/sco_socket.c				1.38
sys/netinet/sctp_usrreq.c			1.14
sys/netinet/tcp_usrreq.c			1.223
sys/netinet6/raw_ip6.c				1.173
sys/netinet6/sctp6_usrreq.c			1.17
sys/netinet6/udp6_usrreq.c			1.146
sys/netmpls/mpls_proto.c			1.32
sys/netnatm/natm.c				patch

	Fix memory leaks pointed out by Ilja Van Sprundel: all
	sendoob() functions are expted to free both passed
	mbuf chains.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Jan 28 12:53:01 2019 UTC (5 years, 10 months ago) by martin
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -6 lines
Fix memory leaks pointed out by Ilja Van Sprundel: all
sendoob() functions are expted to free both passed
mbuf chains.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Wed May 2 07:20:24 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +2 -4 lines
Synch with HEAD

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue May 1 07:21:39 2018 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502
Branch point for: phil-wifi
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -4 lines
Remove now unused net_osdep.h includes, the other BSDs did the same.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:04:29 2018 UTC (6 years, 9 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3 lines
Dedup: merge ipsec4_in_reject and ipsec6_in_reject into ipsec_in_reject.
While here fix misleading comment.

ok ozaki-r@

Revision 1.14.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:05 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.14.2.1: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.2.1: +1357 -0 lines
update from HEAD

Revision 1.14.2.1
Tue Oct 17 19:23:42 2017 UTC (7 years, 1 month ago) by jdolecek
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.14: +0 -1357 lines
file sctp6_usrreq.c was added on branch tls-maxphys on 2017-12-03 11:39:05 +0000

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Oct 17 19:23:42 2017 UTC (7 years, 1 month ago) by rjs
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Branch point for: tls-maxphys
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -2 lines
Make SCTP work when IPSEC is also defined.

Revision 1.1.2.8: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:13 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.7: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.7: +3 -3 lines
Sync with HEAD

Revision 1.6.2.4: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:29 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.6.2.3: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.3: +3 -3 lines
Sync with HEAD

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:06 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +3 -3 lines
Sync with HEAD

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Apr 20 09:19:19 2017 UTC (7 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3 lines
Fix build of kernel with SCTP

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Apr 20 08:46:07 2017 UTC (7 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
Remove unnecessary NULL checks for inp_socket and in6p_socket

They cannot be NULL except for programming errors.

Revision 1.1.2.7: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:59 2017 UTC (7 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.6: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.6: +2 -5 lines
Sync with HEAD

Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:51 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.6.2.2: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.2: +7 -5 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Dec 13 08:29:03 2016 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, pgoyette-localcount-20170107, nick-nhusb-base-20170204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -3 lines
Remove unnecessary inclusions of nd6.h

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Dec 6 08:58:16 2016 UTC (8 years ago) by knakahara
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -4 lines
remove unnecessary extern declaration.

inetsw has been declared since r1.1, however sctp6_usrreq.c can be built
without the declaration. It must be removed.

Revision 1.1.2.6: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:28 2016 UTC (8 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.5: +7 -2 lines
Sync with HEAD

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Nov 18 06:50:04 2016 UTC (8 years ago) by knakahara
Branches: MAIN
CVS tags: nick-nhusb-base-20161204
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +7 -2 lines
fix: "ifconfig destory" can stalls when "ifconfig" is done parallel.
This problem occurs only if NET_MPSAFE on.

ifconfig destroy side:
    kernel entry point is ifioctl => if_clone_destroy.
    pr_purgeif() acquires softnet_lock, and then ifa_remove() calls
    pserialize_perform() holding softnet_lock.
ifconfig side:
    kernel entry point is socreate.
    pr_attach()(udp_attach_wrapper()) calls sosetlock(). In this call path,
    sosetlock() try to acquire softnet_lock.
These can cause dead lock.

Revision 1.1.2.5: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:09 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.4: +6 -6 lines
Sync with HEAD

Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 6 00:19:10 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.6.2.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.1: +3 -2 lines
Sync with HEAD

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Aug 1 03:15:31 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, pgoyette-localcount-20160806, nick-nhusb-base-20161004, localcount-20160914
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -2 lines
Apply pserialize and psref to struct ifaddr and its variants

This change makes struct ifaddr and its variants (in_ifaddr and in6_ifaddr)
MP-safe by using pserialize and psref. At this moment, pserialize_perform
and psref_target_destroy are disabled because (1) we don't need them
because of softnet_lock (2) they cause a deadlock because of softnet_lock.
So we'll enable them when we remove softnet_lock in the future.

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:23 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -6 lines
Sync with HEAD

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Jul 15 07:40:09 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160726
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -6 lines
Use sin6tosa and sin6tocsa macros

No functional change.

Revision 1.1.2.4: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:22 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.3: +5 -5 lines
Sync with HEAD

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Jul 7 09:32:03 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
Switch the address list of intefaces to pslist(9)

As usual, we leave the old list to avoid breaking kvm(3) users.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:31:44 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -4 lines
Avoid storing a pointer of an interface in a mbuf

Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.

The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.

The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.

Proposed on tech-kern and tech-net.

Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:39 2016 UTC (8 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.2: +7 -10 lines
Sync with HEAD

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Apr 25 21:21:02 2016 UTC (8 years, 7 months ago) by rjs
Branches: MAIN
CVS tags: nick-nhusb-base-20160529
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +7 -10 lines
Fix build when IPSEC enabled.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jan 21 15:41:30 2016 UTC (8 years, 10 months ago) by riastradh
Branches: MAIN
CVS tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -0 lines
Revert previous: ran cvs commit when I meant cvs diff.  Sorry!

Hit up-arrow one too few times.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Jan 21 15:27:48 2016 UTC (8 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -4 lines
Give proper prototype to ip_output.

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:07 2015 UTC (8 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.1: +1355 -0 lines
Sync with HEAD (as of 26th Dec)

Revision 1.1.2.1
Tue Oct 13 21:28:35 2015 UTC (9 years, 1 month ago) by skrll
Branches: nick-nhusb
FILE REMOVED
Changes since revision 1.1: +0 -1355 lines
file sctp6_usrreq.c was added on branch nick-nhusb on 2015-12-27 12:10:07 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Oct 13 21:28:35 2015 UTC (9 years, 1 month ago) by rjs
Branches: MAIN
CVS tags: nick-nhusb-base-20151226
Branch point for: nick-nhusb
Add core networking support for SCTP.

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>