summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-05-27 08:09:57 -0700
committerDavid S. Miller <davem@davemloft.net>2018-05-29 10:12:45 -0400
commitaf4d768ad28cbf6542ba70dba10b49127b31b762 (patch)
treea9491a2cbbff82fd3159ffd24f6f5d7442299090 /include
parent620dee9415fae09003d012cc7c23b011e5ebb43d (diff)
downloadop-kernel-dev-af4d768ad28cbf6542ba70dba10b49127b31b762.zip
op-kernel-dev-af4d768ad28cbf6542ba70dba10b49127b31b762.tar.gz
net/ipv4: Add support for specifying metric of connected routes
Add support for IFA_RT_PRIORITY to ipv4 addresses. If the metric is changed on an existing address then the new route is inserted before removing the old one. Since the metric is one of the route keys, the prefix route can not be replaced. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/inetdevice.h1
-rw-r--r--include/net/route.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index e16fe7d..27650f1 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -139,6 +139,7 @@ struct in_ifaddr {
__be32 ifa_local;
__be32 ifa_address;
__be32 ifa_mask;
+ __u32 ifa_rt_priority;
__be32 ifa_broadcast;
unsigned char ifa_scope;
unsigned char ifa_prefixlen;
diff --git a/include/net/route.h b/include/net/route.h
index dbb032d..bb53cdb 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -225,6 +225,7 @@ struct rtable *rt_dst_alloc(struct net_device *dev,
struct in_ifaddr;
void fib_add_ifaddr(struct in_ifaddr *);
void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *);
+void fib_modify_prefix_metric(struct in_ifaddr *ifa, u32 new_metric);
void rt_add_uncached_list(struct rtable *rt);
void rt_del_uncached_list(struct rtable *rt);
OpenPOWER on IntegriCloud