net: ipv4: route.c: Fix indentation of multi line comment.
All comment lines inside the comment block have been aligned. Every line of comment starts with a * (uniformity in code). Signed-off-by: Shubhankar Kuranagatti <shubhankarvk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
12bb508bfe
commit
6ad086009f
@@ -722,6 +722,7 @@ static void update_or_create_fnhe(struct fib_nh_common *nhc, __be32 daddr,
|
|||||||
|
|
||||||
for_each_possible_cpu(i) {
|
for_each_possible_cpu(i) {
|
||||||
struct rtable __rcu **prt;
|
struct rtable __rcu **prt;
|
||||||
|
|
||||||
prt = per_cpu_ptr(nhc->nhc_pcpu_rth_output, i);
|
prt = per_cpu_ptr(nhc->nhc_pcpu_rth_output, i);
|
||||||
rt = rcu_dereference(*prt);
|
rt = rcu_dereference(*prt);
|
||||||
if (rt)
|
if (rt)
|
||||||
@@ -1258,12 +1259,12 @@ static int ip_rt_bug(struct net *net, struct sock *sk, struct sk_buff *skb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We do not cache source address of outgoing interface,
|
* We do not cache source address of outgoing interface,
|
||||||
because it is used only by IP RR, TS and SRR options,
|
* because it is used only by IP RR, TS and SRR options,
|
||||||
so that it out of fast path.
|
* so that it out of fast path.
|
||||||
|
*
|
||||||
BTW remember: "addr" is allowed to be not aligned
|
* BTW remember: "addr" is allowed to be not aligned
|
||||||
in IP options!
|
* in IP options!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ip_rt_get_source(u8 *addr, struct sk_buff *skb, struct rtable *rt)
|
void ip_rt_get_source(u8 *addr, struct sk_buff *skb, struct rtable *rt)
|
||||||
@@ -2108,7 +2109,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Check for the most weird martians, which can be not detected
|
/* Check for the most weird martians, which can be not detected
|
||||||
by fib_lookup.
|
* by fib_lookup.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tun_info = skb_tunnel_info(skb);
|
tun_info = skb_tunnel_info(skb);
|
||||||
@@ -2317,15 +2318,15 @@ int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
|||||||
u8 tos, struct net_device *dev, struct fib_result *res)
|
u8 tos, struct net_device *dev, struct fib_result *res)
|
||||||
{
|
{
|
||||||
/* Multicast recognition logic is moved from route cache to here.
|
/* Multicast recognition logic is moved from route cache to here.
|
||||||
The problem was that too many Ethernet cards have broken/missing
|
* The problem was that too many Ethernet cards have broken/missing
|
||||||
hardware multicast filters :-( As result the host on multicasting
|
* hardware multicast filters :-( As result the host on multicasting
|
||||||
network acquires a lot of useless route cache entries, sort of
|
* network acquires a lot of useless route cache entries, sort of
|
||||||
SDR messages from all the world. Now we try to get rid of them.
|
* SDR messages from all the world. Now we try to get rid of them.
|
||||||
Really, provided software IP multicast filter is organized
|
* Really, provided software IP multicast filter is organized
|
||||||
reasonably (at least, hashed), it does not result in a slowdown
|
* reasonably (at least, hashed), it does not result in a slowdown
|
||||||
comparing with route cache reject entries.
|
* comparing with route cache reject entries.
|
||||||
Note, that multicast routers are not affected, because
|
* Note, that multicast routers are not affected, because
|
||||||
route cache entry is created eventually.
|
* route cache entry is created eventually.
|
||||||
*/
|
*/
|
||||||
if (ipv4_is_multicast(daddr)) {
|
if (ipv4_is_multicast(daddr)) {
|
||||||
struct in_device *in_dev = __in_dev_get_rcu(dev);
|
struct in_device *in_dev = __in_dev_get_rcu(dev);
|
||||||
@@ -2537,11 +2538,11 @@ struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *fl4,
|
|||||||
rth = ERR_PTR(-ENETUNREACH);
|
rth = ERR_PTR(-ENETUNREACH);
|
||||||
|
|
||||||
/* I removed check for oif == dev_out->oif here.
|
/* I removed check for oif == dev_out->oif here.
|
||||||
It was wrong for two reasons:
|
* It was wrong for two reasons:
|
||||||
1. ip_dev_find(net, saddr) can return wrong iface, if saddr
|
* 1. ip_dev_find(net, saddr) can return wrong iface, if saddr
|
||||||
is assigned to multiple interfaces.
|
* is assigned to multiple interfaces.
|
||||||
2. Moreover, we are allowed to send packets with saddr
|
* 2. Moreover, we are allowed to send packets with saddr
|
||||||
of another iface. --ANK
|
* of another iface. --ANK
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (fl4->flowi4_oif == 0 &&
|
if (fl4->flowi4_oif == 0 &&
|
||||||
@@ -2553,18 +2554,18 @@ struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *fl4,
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Special hack: user can direct multicasts
|
/* Special hack: user can direct multicasts
|
||||||
and limited broadcast via necessary interface
|
* and limited broadcast via necessary interface
|
||||||
without fiddling with IP_MULTICAST_IF or IP_PKTINFO.
|
* without fiddling with IP_MULTICAST_IF or IP_PKTINFO.
|
||||||
This hack is not just for fun, it allows
|
* This hack is not just for fun, it allows
|
||||||
vic,vat and friends to work.
|
* vic,vat and friends to work.
|
||||||
They bind socket to loopback, set ttl to zero
|
* They bind socket to loopback, set ttl to zero
|
||||||
and expect that it will work.
|
* and expect that it will work.
|
||||||
From the viewpoint of routing cache they are broken,
|
* From the viewpoint of routing cache they are broken,
|
||||||
because we are not allowed to build multicast path
|
* because we are not allowed to build multicast path
|
||||||
with loopback source addr (look, routing cache
|
* with loopback source addr (look, routing cache
|
||||||
cannot know, that ttl is zero, so that packet
|
* cannot know, that ttl is zero, so that packet
|
||||||
will not leave this host and route is valid).
|
* will not leave this host and route is valid).
|
||||||
Luckily, this hack is good workaround.
|
* Luckily, this hack is good workaround.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fl4->flowi4_oif = dev_out->ifindex;
|
fl4->flowi4_oif = dev_out->ifindex;
|
||||||
@@ -2627,21 +2628,21 @@ struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *fl4,
|
|||||||
(ipv4_is_multicast(fl4->daddr) ||
|
(ipv4_is_multicast(fl4->daddr) ||
|
||||||
!netif_index_is_l3_master(net, fl4->flowi4_oif))) {
|
!netif_index_is_l3_master(net, fl4->flowi4_oif))) {
|
||||||
/* Apparently, routing tables are wrong. Assume,
|
/* Apparently, routing tables are wrong. Assume,
|
||||||
that the destination is on link.
|
* that the destination is on link.
|
||||||
|
*
|
||||||
WHY? DW.
|
* WHY? DW.
|
||||||
Because we are allowed to send to iface
|
* Because we are allowed to send to iface
|
||||||
even if it has NO routes and NO assigned
|
* even if it has NO routes and NO assigned
|
||||||
addresses. When oif is specified, routing
|
* addresses. When oif is specified, routing
|
||||||
tables are looked up with only one purpose:
|
* tables are looked up with only one purpose:
|
||||||
to catch if destination is gatewayed, rather than
|
* to catch if destination is gatewayed, rather than
|
||||||
direct. Moreover, if MSG_DONTROUTE is set,
|
* direct. Moreover, if MSG_DONTROUTE is set,
|
||||||
we send packet, ignoring both routing tables
|
* we send packet, ignoring both routing tables
|
||||||
and ifaddr state. --ANK
|
* and ifaddr state. --ANK
|
||||||
|
*
|
||||||
|
*
|
||||||
We could make it even if oif is unknown,
|
* We could make it even if oif is unknown,
|
||||||
likely IPv6, but we do not.
|
* likely IPv6, but we do not.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (fl4->saddr == 0)
|
if (fl4->saddr == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user