diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 22:08:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:34 -0400 |
commit | b529ccf2799c14346d1518e9bdf1f88f03643e99 (patch) | |
tree | f899a5a5d66d2ca21724c1871ee3afeda6c4a670 /net/ipv4/fib_frontend.c | |
parent | 965ffea43d4ebe8cd7b9fee78d651268dd7d23c5 (diff) |
[NETLINK]: Introduce nlmsg_hdr() helper
For the common "(struct nlmsghdr *)skb->data" sequence, so that we reduce the
number of direct accesses to skb->data and for consistency with all the other
cast skb member helpers.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index cac06c43f004..3ff753c6f197 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -807,7 +807,7 @@ static void nl_fib_input(struct sock *sk, int len) | |||
807 | if (skb == NULL) | 807 | if (skb == NULL) |
808 | return; | 808 | return; |
809 | 809 | ||
810 | nlh = (struct nlmsghdr *)skb->data; | 810 | nlh = nlmsg_hdr(skb); |
811 | if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || | 811 | if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || |
812 | nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) { | 812 | nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) { |
813 | kfree_skb(skb); | 813 | kfree_skb(skb); |