diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 16:38:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 16:38:27 -0400 |
commit | aecdc33e111b2c447b622e287c6003726daa1426 (patch) | |
tree | 3e7657eae4b785e1a1fb5dfb225dbae0b2f0cfc6 /net/ipv6/addrlabel.c | |
parent | a20acf99f75e49271381d65db097c9763060a1e8 (diff) | |
parent | a3a6cab5ea10cca64d036851fe0d932448f2fe4f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller:
1) GRE now works over ipv6, from Dmitry Kozlov.
2) Make SCTP more network namespace aware, from Eric Biederman.
3) TEAM driver now works with non-ethernet devices, from Jiri Pirko.
4) Make openvswitch network namespace aware, from Pravin B Shelar.
5) IPV6 NAT implementation, from Patrick McHardy.
6) Server side support for TCP Fast Open, from Jerry Chu and others.
7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel
Borkmann.
8) Increate the loopback default MTU to 64K, from Eric Dumazet.
9) Use a per-task rather than per-socket page fragment allocator for
outgoing networking traffic. This benefits processes that have very
many mostly idle sockets, which is quite common.
From Eric Dumazet.
10) Use up to 32K for page fragment allocations, with fallbacks to
smaller sizes when higher order page allocations fail. Benefits are
a) less segments for driver to process b) less calls to page
allocator c) less waste of space.
From Eric Dumazet.
11) Allow GRO to be used on GRE tunnels, from Eric Dumazet.
12) VXLAN device driver, one way to handle VLAN issues such as the
limitation of 4096 VLAN IDs yet still have some level of isolation.
From Stephen Hemminger.
13) As usual there is a large boatload of driver changes, with the scale
perhaps tilted towards the wireless side this time around.
Fix up various fairly trivial conflicts, mostly caused by the user
namespace changes.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits)
hyperv: Add buffer for extended info after the RNDIS response message.
hyperv: Report actual status in receive completion packet
hyperv: Remove extra allocated space for recv_pkt_list elements
hyperv: Fix page buffer handling in rndis_filter_send_request()
hyperv: Fix the missing return value in rndis_filter_set_packet_filter()
hyperv: Fix the max_xfer_size in RNDIS initialization
vxlan: put UDP socket in correct namespace
vxlan: Depend on CONFIG_INET
sfc: Fix the reported priorities of different filter types
sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP
sfc: Fix loopback self-test with separate_tx_channels=1
sfc: Fix MCDI structure field lookup
sfc: Add parentheses around use of bitfield macro arguments
sfc: Fix null function pointer in efx_sriov_channel_type
vxlan: virtual extensible lan
igmp: export symbol ip_mc_leave_group
netlink: add attributes to fdb interface
tg3: unconditionally select HWMON support when tg3 is enabled.
Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT"
gre: fix sparse warning
...
Diffstat (limited to 'net/ipv6/addrlabel.c')
-rw-r--r-- | net/ipv6/addrlabel.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index eb6a63632d3c..4be23da32b89 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
@@ -57,7 +57,7 @@ struct net *ip6addrlbl_net(const struct ip6addrlbl_entry *lbl) | |||
57 | } | 57 | } |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Default policy table (RFC3484 + extensions) | 60 | * Default policy table (RFC6724 + extensions) |
61 | * | 61 | * |
62 | * prefix addr_type label | 62 | * prefix addr_type label |
63 | * ------------------------------------------------------------------------- | 63 | * ------------------------------------------------------------------------- |
@@ -69,8 +69,12 @@ struct net *ip6addrlbl_net(const struct ip6addrlbl_entry *lbl) | |||
69 | * fc00::/7 N/A 5 ULA (RFC 4193) | 69 | * fc00::/7 N/A 5 ULA (RFC 4193) |
70 | * 2001::/32 N/A 6 Teredo (RFC 4380) | 70 | * 2001::/32 N/A 6 Teredo (RFC 4380) |
71 | * 2001:10::/28 N/A 7 ORCHID (RFC 4843) | 71 | * 2001:10::/28 N/A 7 ORCHID (RFC 4843) |
72 | * fec0::/10 N/A 11 Site-local | ||
73 | * (deprecated by RFC3879) | ||
74 | * 3ffe::/16 N/A 12 6bone | ||
72 | * | 75 | * |
73 | * Note: 0xffffffff is used if we do not have any policies. | 76 | * Note: 0xffffffff is used if we do not have any policies. |
77 | * Note: Labels for ULA and 6to4 are different from labels listed in RFC6724. | ||
74 | */ | 78 | */ |
75 | 79 | ||
76 | #define IPV6_ADDR_LABEL_DEFAULT 0xffffffffUL | 80 | #define IPV6_ADDR_LABEL_DEFAULT 0xffffffffUL |
@@ -88,10 +92,18 @@ static const __net_initdata struct ip6addrlbl_init_table | |||
88 | .prefix = &(struct in6_addr){{{ 0xfc }}}, | 92 | .prefix = &(struct in6_addr){{{ 0xfc }}}, |
89 | .prefixlen = 7, | 93 | .prefixlen = 7, |
90 | .label = 5, | 94 | .label = 5, |
95 | },{ /* fec0::/10 */ | ||
96 | .prefix = &(struct in6_addr){{{ 0xfe, 0xc0 }}}, | ||
97 | .prefixlen = 10, | ||
98 | .label = 11, | ||
91 | },{ /* 2002::/16 */ | 99 | },{ /* 2002::/16 */ |
92 | .prefix = &(struct in6_addr){{{ 0x20, 0x02 }}}, | 100 | .prefix = &(struct in6_addr){{{ 0x20, 0x02 }}}, |
93 | .prefixlen = 16, | 101 | .prefixlen = 16, |
94 | .label = 2, | 102 | .label = 2, |
103 | },{ /* 3ffe::/16 */ | ||
104 | .prefix = &(struct in6_addr){{{ 0x3f, 0xfe }}}, | ||
105 | .prefixlen = 16, | ||
106 | .label = 12, | ||
95 | },{ /* 2001::/32 */ | 107 | },{ /* 2001::/32 */ |
96 | .prefix = &(struct in6_addr){{{ 0x20, 0x01 }}}, | 108 | .prefix = &(struct in6_addr){{{ 0x20, 0x01 }}}, |
97 | .prefixlen = 32, | 109 | .prefixlen = 32, |
@@ -470,10 +482,10 @@ static void ip6addrlbl_putmsg(struct nlmsghdr *nlh, | |||
470 | static int ip6addrlbl_fill(struct sk_buff *skb, | 482 | static int ip6addrlbl_fill(struct sk_buff *skb, |
471 | struct ip6addrlbl_entry *p, | 483 | struct ip6addrlbl_entry *p, |
472 | u32 lseq, | 484 | u32 lseq, |
473 | u32 pid, u32 seq, int event, | 485 | u32 portid, u32 seq, int event, |
474 | unsigned int flags) | 486 | unsigned int flags) |
475 | { | 487 | { |
476 | struct nlmsghdr *nlh = nlmsg_put(skb, pid, seq, event, | 488 | struct nlmsghdr *nlh = nlmsg_put(skb, portid, seq, event, |
477 | sizeof(struct ifaddrlblmsg), flags); | 489 | sizeof(struct ifaddrlblmsg), flags); |
478 | if (!nlh) | 490 | if (!nlh) |
479 | return -EMSGSIZE; | 491 | return -EMSGSIZE; |
@@ -503,7 +515,7 @@ static int ip6addrlbl_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
503 | net_eq(ip6addrlbl_net(p), net)) { | 515 | net_eq(ip6addrlbl_net(p), net)) { |
504 | if ((err = ip6addrlbl_fill(skb, p, | 516 | if ((err = ip6addrlbl_fill(skb, p, |
505 | ip6addrlbl_table.seq, | 517 | ip6addrlbl_table.seq, |
506 | NETLINK_CB(cb->skb).pid, | 518 | NETLINK_CB(cb->skb).portid, |
507 | cb->nlh->nlmsg_seq, | 519 | cb->nlh->nlmsg_seq, |
508 | RTM_NEWADDRLABEL, | 520 | RTM_NEWADDRLABEL, |
509 | NLM_F_MULTI)) <= 0) | 521 | NLM_F_MULTI)) <= 0) |
@@ -574,7 +586,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, | |||
574 | } | 586 | } |
575 | 587 | ||
576 | err = ip6addrlbl_fill(skb, p, lseq, | 588 | err = ip6addrlbl_fill(skb, p, lseq, |
577 | NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, | 589 | NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, |
578 | RTM_NEWADDRLABEL, 0); | 590 | RTM_NEWADDRLABEL, 0); |
579 | 591 | ||
580 | ip6addrlbl_put(p); | 592 | ip6addrlbl_put(p); |
@@ -585,7 +597,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, | |||
585 | goto out; | 597 | goto out; |
586 | } | 598 | } |
587 | 599 | ||
588 | err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).pid); | 600 | err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).portid); |
589 | out: | 601 | out: |
590 | return err; | 602 | return err; |
591 | } | 603 | } |