]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r279588:
authorae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 12 Mar 2015 09:04:19 +0000 (09:04 +0000)
committerae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 12 Mar 2015 09:04:19 +0000 (09:04 +0000)
commitaed4b8be72a9512114349bd63db0e27d89cfcf5f
treeae85a23781ca4be76eaf454f6f14a23317b17096
parent5ce9ec3b2a5e3326adb973fc7b47794df2f69235
MFC r279588:
  Fix deadlock in IPv6 PCB code.

  When several threads are trying to send datagram to the same destination,
  but fragmentation is disabled and datagram size exceeds link MTU,
  ip6_output() calls pfctlinput2(PRC_MSGSIZE). It does notify all
  sockets wanted to know MTU to this destination. And since all threads
  hold PCB lock while sending, taking the lock for each PCB in the
  in6_pcbnotify() leads to deadlock.

  RFC 3542 p.11.3 suggests notify all application wanted to receive
  IPV6_PATHMTU ancillary data for each ICMPv6 packet too big message.
  But it doesn't require this, when we don't receive ICMPv6 message.

  Change ip6_notify_pmtu() function to be able use it directly from
  ip6_output() to notify only one socket, and to notify all sockets
  when ICMPv6 packet too big message received.

MFC r279684:
  tcp6_ctlinput() doesn't pass MTU value to in6_pcbnotify().
  Check cmdarg isn't NULL before dereference, this check was in the
  ip6_notify_pmtu() before r279588.

PR: 197059
Sponsored by: Yandex LLC

git-svn-id: svn://svn.freebsd.org/base/stable/10@279911 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netinet6/in6_pcb.c
sys/netinet6/ip6_input.c
sys/netinet6/ip6_output.c
sys/netinet6/ip6_var.h