summaryrefslogtreecommitdiff
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-12-06 15:43:30 -0800
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-04 15:18:24 +0900
commit95e41e93e18d8e1e272ce23d96bae4f17ce11d42 (patch)
treec3b138bc03f3cb04396b3326b4fed13689b0366d /net/ipv6/ndisc.c
parent5e5f3f0f801321078c897a5de0b4b4304f234da0 (diff)
downloadlinux-3.10-95e41e93e18d8e1e272ce23d96bae4f17ce11d42.tar.gz
linux-3.10-95e41e93e18d8e1e272ce23d96bae4f17ce11d42.tar.bz2
linux-3.10-95e41e93e18d8e1e272ce23d96bae4f17ce11d42.zip
[IPV6]: Make ndisc_flow_init() common for later use.
For later use, this patch is renaming ndisc_flow_init() to icmpv6_flow_init() and putting it in common place. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 1fc33c8c723..8db5f4a419a 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -441,21 +441,6 @@ static void pndisc_destructor(struct pneigh_entry *n)
/*
* Send a Neighbour Advertisement
*/
-
-static inline void ndisc_flow_init(struct flowi *fl, u8 type,
- struct in6_addr *saddr, struct in6_addr *daddr,
- int oif)
-{
- memset(fl, 0, sizeof(*fl));
- ipv6_addr_copy(&fl->fl6_src, saddr);
- ipv6_addr_copy(&fl->fl6_dst, daddr);
- fl->proto = IPPROTO_ICMPV6;
- fl->fl_icmp_type = type;
- fl->fl_icmp_code = 0;
- fl->oif = oif;
- security_sk_classify_flow(ndisc_socket->sk, fl);
-}
-
static void __ndisc_send(struct net_device *dev,
struct neighbour *neigh,
struct in6_addr *daddr, struct in6_addr *saddr,
@@ -474,8 +459,8 @@ static void __ndisc_send(struct net_device *dev,
type = icmp6h->icmp6_type;
- ndisc_flow_init(&fl, type, saddr, daddr,
- dev->ifindex);
+ icmpv6_flow_init(ndisc_socket->sk, &fl, type,
+ saddr, daddr, dev->ifindex);
dst = ndisc_dst_alloc(dev, neigh, daddr, ip6_output);
if (!dst)
@@ -1439,8 +1424,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
return;
}
- ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &ipv6_hdr(skb)->saddr,
- dev->ifindex);
+ icmpv6_flow_init(ndisc_socket->sk, &fl, NDISC_REDIRECT,
+ &saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex);
dst = ip6_route_output(NULL, &fl);
if (dst == NULL)