Skip to content

Commit 5337b5b

Browse files
edumazetdavem330
authored andcommitted
ipv6: fix IPV6_PKTINFO with v4 mapped
Use IS_ENABLED(CONFIG_IPV6), to enable this code if IPv6 is a module. Signed-off-by: Eric Dumazet <[email protected]> Fixes: c8e6ad0 ("ipv6: honor IPV6_PKTINFO with v4 mapped addresses on sendmsg") Acked-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4184b2a commit 5337b5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/ip_sockglue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc,
195195
for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
196196
if (!CMSG_OK(msg, cmsg))
197197
return -EINVAL;
198-
#if defined(CONFIG_IPV6)
198+
#if IS_ENABLED(CONFIG_IPV6)
199199
if (allow_ipv6 &&
200200
cmsg->cmsg_level == SOL_IPV6 &&
201201
cmsg->cmsg_type == IPV6_PKTINFO) {

0 commit comments

Comments
 (0)