]> git.baikalelectronics.ru Git - kernel.git/commit
IPv6: fix CoA check in RH2 input handler (mip6_rthdr_input())
authorArnaud Ebalard <arno@natisbad.org>
Fri, 16 Jul 2010 00:38:44 +0000 (00:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Jul 2010 22:04:33 +0000 (15:04 -0700)
commit23b01c06e3d138ae28e8862698c095e77ae02595
treecedd329461bcfeaad782b574912dbe68dd28d00a
parent27b0ab587a8a22a319000a4c7bd7a2f34e9a1823
IPv6: fix CoA check in RH2 input handler (mip6_rthdr_input())

The input handler for Type 2 Routing Header (mip6_rthdr_input())
checks if the CoA in the packet matches the CoA in the XFRM state.

Current check is buggy: it compares the adddress in the Type 2
Routing Header, i.e. the HoA, against the expected CoA in the state.
The comparison should be made against the address in the destination
field of the IPv6 header.

The bug remained unnoticed because the main (and possibly only current)
user of the code (UMIP MIPv6 Daemon) initializes the XFRM state with the
unspecified address, i.e. explicitly allows everything.

Yoshifuji-san, can you ack that one?

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/mip6.c