diff options
author | Hong zhi guo <honkiko@gmail.com> | 2013-03-27 02:47:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-28 14:25:25 -0400 |
commit | 573ce260b385a4d14a1ef046558fad9f1daeee42 (patch) | |
tree | b577de870934c583a66514b1206964fbd262c340 /net/ipv4/fib_frontend.c | |
parent | e5c5d22e8dcf7c2d430336cbf8e180bd38e8daf1 (diff) |
net-next: replace obsolete NLMSG_* with type safe nlmsg_*
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 0e74398bc8e6..c7629a209f9d 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -957,8 +957,8 @@ static void nl_fib_input(struct sk_buff *skb) | |||
957 | 957 | ||
958 | net = sock_net(skb->sk); | 958 | net = sock_net(skb->sk); |
959 | nlh = nlmsg_hdr(skb); | 959 | nlh = nlmsg_hdr(skb); |
960 | if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || | 960 | if (skb->len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len || |
961 | nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) | 961 | nlmsg_len(nlh) < sizeof(*frn)) |
962 | return; | 962 | return; |
963 | 963 | ||
964 | skb = skb_clone(skb, GFP_KERNEL); | 964 | skb = skb_clone(skb, GFP_KERNEL); |
@@ -966,7 +966,7 @@ static void nl_fib_input(struct sk_buff *skb) | |||
966 | return; | 966 | return; |
967 | nlh = nlmsg_hdr(skb); | 967 | nlh = nlmsg_hdr(skb); |
968 | 968 | ||
969 | frn = (struct fib_result_nl *) NLMSG_DATA(nlh); | 969 | frn = (struct fib_result_nl *) nlmsg_data(nlh); |
970 | tb = fib_get_table(net, frn->tb_id_in); | 970 | tb = fib_get_table(net, frn->tb_id_in); |
971 | 971 | ||
972 | nl_fib_lookup(frn, tb); | 972 | nl_fib_lookup(frn, tb); |