]> git.baikalelectronics.ru Git - kernel.git/commit
net/utils: generic inet_pton_with_scope helper
authorSagi Grimberg <sagi@grimberg.me>
Sun, 5 Feb 2017 19:47:22 +0000 (21:47 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:48:23 +0000 (09:48 -0600)
commit88b07fc90a7fe6b3ec17048220ecb01963d04305
treeafcdc10098a7e7c099afcf1941fe39b5aa20af83
parent5cd610b51486b93236ef77965619e3bc1905c157
net/utils: generic inet_pton_with_scope helper

Several locations in the stack need to handle ipv4/ipv6
(with scope) and port strings conversion to sockaddr.
Add a helper that takes either AF_INET, AF_INET6 or
AF_UNSPEC (for wildcard) to centralize this handling.

Suggested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
include/linux/inet.h
net/core/utils.c