Commit 46479b43 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by David S. Miller

[ARP]: Minus one level of ndentation in arp_req_delete

The same cleanup for deletion requests.
Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 43dc1701
......@@ -1074,17 +1074,14 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev)
return err;
}
static int arp_req_delete(struct arpreq *r, struct net_device * dev)
static int arp_req_delete_public(struct arpreq *r, struct net_device *dev)
{
int err;
__be32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
struct neighbour *neigh;
__be32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
__be32 mask = ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
if (r->arp_flags & ATF_PUBL) {
__be32 mask =
((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
if (mask == htonl(0xFFFFFFFF))
return pneigh_delete(&arp_tbl, &ip, dev);
if (mask == 0) {
if (dev == NULL) {
IPV4_DEVCONF_ALL(PROXY_ARP) = 0;
......@@ -1098,8 +1095,18 @@ static int arp_req_delete(struct arpreq *r, struct net_device * dev)
return -ENXIO;
}
return -EINVAL;
}
}
static int arp_req_delete(struct arpreq *r, struct net_device * dev)
{
int err;
__be32 ip;
struct neighbour *neigh;
if (r->arp_flags & ATF_PUBL)
return arp_req_delete_public(r, dev);
ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
if (dev == NULL) {
struct flowi fl = { .nl_u = { .ip4_u = { .daddr = ip,
.tos = RTO_ONLINK } } };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment