]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] NET: parse ip:port strings correctly in in4_pton
authorJerome Borsboom <j.borsboom@erasmusmc.nl>
Thu, 7 Jun 2007 05:40:27 +0000 (22:40 -0700)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Jun 2007 18:37:11 +0000 (11:37 -0700)
commit4c63cc19a0eda82dc7db063cbdaf6e9710dcb3e3
treeaa564c0793792856f96cb68ef8283fc8e2826b97
parent92b0de8f745ed946c1521ed96ff1dd8f6ff7b466
[PATCH] NET: parse ip:port strings correctly in in4_pton

in4_pton converts a textual representation of an ip4 address
into an integer representation. However, when the textual representation
is of in the form ip:port, e.g. 192.168.1.1:5060, and 'delim' is set to
-1, the function bails out with an error when reading the colon.

It makes sense to allow the colon as a delimiting character without
explicitly having to set it through the 'delim' variable as there can be
no ambiguity in the point where the ip address is completely parsed. This
function is indeed called from nf_conntrack_sip.c in this way to parse
textual ip:port combinations which fails due to the reason stated above.

Signed-off-by: Jerome Borsboom <j.borsboom@erasmusmc.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/core/utils.c