Re: [PATCH net] sctp: check af before verify address in sctp_addr_id2transport

2017-02-07 Thread David Miller
From: Xin Long Date: Tue, 7 Feb 2017 20:56:08 +0800 > Commit 6f29a1306131 ("sctp: sctp_addr_id2transport should verify the > addr before looking up assoc") invoked sctp_verify_addr to verify the > addr. > > But it didn't check af variable beforehand, once users pass an address > with family = 0

Re: [PATCH net] sctp: check af before verify address in sctp_addr_id2transport

2017-02-07 Thread Marcelo Ricardo Leitner
On Tue, Feb 07, 2017 at 08:56:08PM +0800, Xin Long wrote: > Commit 6f29a1306131 ("sctp: sctp_addr_id2transport should verify the > addr before looking up assoc") invoked sctp_verify_addr to verify the > addr. > > But it didn't check af variable beforehand, once users pass an address > with family

[PATCH net] sctp: check af before verify address in sctp_addr_id2transport

2017-02-07 Thread Xin Long
Commit 6f29a1306131 ("sctp: sctp_addr_id2transport should verify the addr before looking up assoc") invoked sctp_verify_addr to verify the addr. But it didn't check af variable beforehand, once users pass an address with family = 0 through sockopt, sctp_get_af_specific will return NULL and NULL po