android_kernel_samsung_msm8976/net/sctp
Xufeng Zhang 4de3e298aa sctp: reset flowi4_oif parameter on route lookup
[ Upstream commit 85350871317a5adb35519d9dc6fc9e80809d42ad ]

commit 813b3b5db8 (ipv4: Use caller's on-stack flowi as-is
in output route lookups.) introduces another regression which
is very similar to the problem of commit e6b45241c (ipv4: reset
flowi parameters on route connect) wants to fix:
Before we call ip_route_output_key() in sctp_v4_get_dst() to
get a dst that matches a bind address as the source address,
we have already called this function previously and the flowi
parameters have been initialized including flowi4_oif, so when
we call this function again, the process in __ip_route_output_key()
will be different because of the setting of flowi4_oif, and we'll
get a networking device which corresponds to the inputted flowi4_oif
as the output device, this is wrong because we'll never hit this
place if the previously returned source address of dst match one
of the bound addresses.

To reproduce this problem, a vlan setting is enough:
  # ifconfig eth0 up
  # route del default
  # vconfig add eth0 2
  # vconfig add eth0 3
  # ifconfig eth0.2 10.0.1.14 netmask 255.255.255.0
  # route add default gw 10.0.1.254 dev eth0.2
  # ifconfig eth0.3 10.0.0.14 netmask 255.255.255.0
  # ip rule add from 10.0.0.14 table 4
  # ip route add table 4 default via 10.0.0.254 src 10.0.0.14 dev eth0.3
  # sctp_darn -H 10.0.0.14 -P 36422 -h 10.1.4.134 -p 36422 -s -I
You'll detect that all the flow are routed to eth0.2(10.0.1.254).

Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-30 21:52:16 -07:00
..
Kconfig net, sctp: remove CONFIG_EXPERIMENTAL 2013-02-13 13:57:27 -05:00
Makefile
associola.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
auth.c net: sctp: cache auth_enable per endpoint 2014-05-30 21:52:15 -07:00
bind_addr.c net: sctp: sctp_bind_addr: remove dead code 2013-04-17 14:13:02 -04:00
chunk.c sctp: fix -ENOMEM result with invalid user space pointer in sendto() syscall 2012-11-28 11:11:17 -05:00
command.c
debug.c
endpointola.c net: sctp: cache auth_enable per endpoint 2014-05-30 21:52:15 -07:00
input.c net: sctp: rfc4443: do not report ICMP redirects to user space 2013-10-13 16:08:29 -07:00
inqueue.c net: sctp: sctp_inq: remove dead code 2013-04-17 14:13:02 -04:00
ipv6.c net: sctp: rfc4443: do not report ICMP redirects to user space 2013-10-13 16:08:29 -07:00
objcnt.c sctp: Make the proc files per network namespace. 2012-08-14 23:29:53 -07:00
output.c sctp: Perform software checksum if packet has to be fragmented. 2013-11-04 04:31:04 -08:00
outqueue.c sctp: fully initialize sctp_outq in sctp_outq_init 2013-06-13 18:05:24 -07:00
primitive.c sctp: Push struct net down to sctp_chunk_event_lookup 2012-08-14 23:30:37 -07:00
probe.c net: sctp: attribute printl with __printf for gcc fmt checks 2013-05-01 15:04:10 -04:00
proc.c sctp: Add buffer utilization fields to /proc/net/sctp/assocs 2013-04-16 16:43:34 -04:00
protocol.c sctp: reset flowi4_oif parameter on route lookup 2014-05-30 21:52:16 -07:00
sm_make_chunk.c net: sctp: cache auth_enable per endpoint 2014-05-30 21:52:15 -07:00
sm_sideeffect.c net: remove redundant check for timer pending state before del_timer 2013-02-04 13:26:49 -05:00
sm_statefuns.c net: sctp: cache auth_enable per endpoint 2014-05-30 21:52:15 -07:00
sm_statetable.c sctp: Make sysctl tunables per net 2012-08-14 23:32:16 -07:00
socket.c net: sctp: cache auth_enable per endpoint 2014-05-30 21:52:15 -07:00
ssnmap.c net: sctp: sctp_ssnmap: remove 'malloced' element from struct 2013-04-17 14:13:02 -04:00
sysctl.c net: sctp: cache auth_enable per endpoint 2014-05-30 21:52:15 -07:00
transport.c net: sctp: sctp_transport: remove unused variable 2013-04-17 14:13:02 -04:00
tsnmap.c sctp: fix association hangs due to off-by-one errors in sctp_tsnmap_grow() 2013-02-28 15:34:26 -05:00
ulpevent.c netvm: prevent a stream-specific deadlock 2012-07-31 18:42:47 -07:00
ulpqueue.c net: sctp: sctp_ulpq: remove 'malloced' struct member 2013-04-17 14:13:02 -04:00