diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2018-06-22 22:20:35 +0300 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-22 22:20:35 +0300 | 
| commit | 7731b8bc94e599c9a79e428f3359ff2c34b7576a (patch) | |
| tree | 879f18ccbe274122f2d4f095b43cbc7f953e0ada /net/ipv4/netlink.c | |
| parent | 48e315618dc4dc8904182cd221e3d395d5d97005 (diff) | |
| parent | 9ffc59d57228d74809700be6f7ecb1db10292f05 (diff) | |
| download | linux-7731b8bc94e599c9a79e428f3359ff2c34b7576a.tar.xz | |
Merge branch 'linus' into x86/urgent
Required to queue a dependent fix.
Diffstat (limited to 'net/ipv4/netlink.c')
| -rw-r--r-- | net/ipv4/netlink.c | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/net/ipv4/netlink.c b/net/ipv4/netlink.c new file mode 100644 index 000000000000..f86bb4f06609 --- /dev/null +++ b/net/ipv4/netlink.c @@ -0,0 +1,23 @@ +#include <linux/netlink.h> +#include <linux/rtnetlink.h> +#include <linux/types.h> +#include <net/net_namespace.h> +#include <net/netlink.h> +#include <net/ip.h> + +int rtm_getroute_parse_ip_proto(struct nlattr *attr, u8 *ip_proto, +				struct netlink_ext_ack *extack) +{ +	*ip_proto = nla_get_u8(attr); + +	switch (*ip_proto) { +	case IPPROTO_TCP: +	case IPPROTO_UDP: +	case IPPROTO_ICMP: +		return 0; +	default: +		NL_SET_ERR_MSG(extack, "Unsupported ip proto"); +		return -EOPNOTSUPP; +	} +} +EXPORT_SYMBOL_GPL(rtm_getroute_parse_ip_proto);  | 
