af_mpls.c (5b441ac8784c1e7f3c619f14da4c3f52e87348d5) | af_mpls.c (a59166e470868d92f0813977817e99e699398af5) |
---|---|
1#include <linux/types.h> 2#include <linux/skbuff.h> 3#include <linux/socket.h> 4#include <linux/sysctl.h> 5#include <linux/net.h> 6#include <linux/module.h> 7#include <linux/if_arp.h> 8#include <linux/ipv6.h> --- 20 unchanged lines hidden (view full) --- 29 */ 30#define MAX_MP_SELECT_LABELS 4 31 32#define MPLS_NEIGH_TABLE_UNSPEC (NEIGH_LINK_TABLE + 1) 33 34static int zero = 0; 35static int one = 1; 36static int label_limit = (1 << 20) - 1; | 1#include <linux/types.h> 2#include <linux/skbuff.h> 3#include <linux/socket.h> 4#include <linux/sysctl.h> 5#include <linux/net.h> 6#include <linux/module.h> 7#include <linux/if_arp.h> 8#include <linux/ipv6.h> --- 20 unchanged lines hidden (view full) --- 29 */ 30#define MAX_MP_SELECT_LABELS 4 31 32#define MPLS_NEIGH_TABLE_UNSPEC (NEIGH_LINK_TABLE + 1) 33 34static int zero = 0; 35static int one = 1; 36static int label_limit = (1 << 20) - 1; |
37static int ttl_max = 255; |
|
37 38static void rtmsg_lfib(int event, u32 label, struct mpls_route *rt, 39 struct nlmsghdr *nlh, struct net *net, u32 portid, 40 unsigned int nlm_flags); 41 42static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index) 43{ 44 struct mpls_route *rt = NULL; --- 1992 unchanged lines hidden (view full) --- 2037 .procname = "ip_ttl_propagate", 2038 .data = MPLS_NS_SYSCTL_OFFSET(mpls.ip_ttl_propagate), 2039 .maxlen = sizeof(int), 2040 .mode = 0644, 2041 .proc_handler = proc_dointvec_minmax, 2042 .extra1 = &zero, 2043 .extra2 = &one, 2044 }, | 38 39static void rtmsg_lfib(int event, u32 label, struct mpls_route *rt, 40 struct nlmsghdr *nlh, struct net *net, u32 portid, 41 unsigned int nlm_flags); 42 43static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index) 44{ 45 struct mpls_route *rt = NULL; --- 1992 unchanged lines hidden (view full) --- 2038 .procname = "ip_ttl_propagate", 2039 .data = MPLS_NS_SYSCTL_OFFSET(mpls.ip_ttl_propagate), 2040 .maxlen = sizeof(int), 2041 .mode = 0644, 2042 .proc_handler = proc_dointvec_minmax, 2043 .extra1 = &zero, 2044 .extra2 = &one, 2045 }, |
2046 { 2047 .procname = "default_ttl", 2048 .data = MPLS_NS_SYSCTL_OFFSET(mpls.default_ttl), 2049 .maxlen = sizeof(int), 2050 .mode = 0644, 2051 .proc_handler = proc_dointvec_minmax, 2052 .extra1 = &one, 2053 .extra2 = &ttl_max, 2054 }, |
|
2045 { } 2046}; 2047 2048static int mpls_net_init(struct net *net) 2049{ 2050 struct ctl_table *table; 2051 int i; 2052 2053 net->mpls.platform_labels = 0; 2054 net->mpls.platform_label = NULL; 2055 net->mpls.ip_ttl_propagate = 1; | 2055 { } 2056}; 2057 2058static int mpls_net_init(struct net *net) 2059{ 2060 struct ctl_table *table; 2061 int i; 2062 2063 net->mpls.platform_labels = 0; 2064 net->mpls.platform_label = NULL; 2065 net->mpls.ip_ttl_propagate = 1; |
2066 net->mpls.default_ttl = 255; |
|
2056 2057 table = kmemdup(mpls_table, sizeof(mpls_table), GFP_KERNEL); 2058 if (table == NULL) 2059 return -ENOMEM; 2060 2061 /* Table data contains only offsets relative to the base of 2062 * the mdev at this point, so make them absolute. 2063 */ --- 102 unchanged lines hidden --- | 2067 2068 table = kmemdup(mpls_table, sizeof(mpls_table), GFP_KERNEL); 2069 if (table == NULL) 2070 return -ENOMEM; 2071 2072 /* Table data contains only offsets relative to the base of 2073 * the mdev at this point, so make them absolute. 2074 */ --- 102 unchanged lines hidden --- |