Skip to content

Commit

Permalink
ipv6: Check the hop limit setting in ancillary data.
Browse files Browse the repository at this point in the history
When specifing the outgoing hop limit as ancillary data for sendmsg(),
the kernel doesn't check the integer hop limit value as specified in
[RFC-3542] section 6.3.

Signed-off-by: Shan Wei <[email protected]>
Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
  • Loading branch information
Shan Wei authored and yoshfuji committed Jun 12, 2008
1 parent 36e3dea commit e8766fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/ipv6/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,11 @@ int datagram_send_ctl(struct net *net,
}

*hlimit = *(int *)CMSG_DATA(cmsg);
if (*hlimit < -1 || *hlimit > 0xff) {
err = -EINVAL;
goto exit_f;
}

break;

case IPV6_TCLASS:
Expand Down

0 comments on commit e8766fc

Please sign in to comment.