aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
Commit message (Expand)AuthorAge
* net: Use hton[sl]() instead of __constant_hton[sl]() where applicableArnaldo Carvalho de Melo2008-09-21
* vlan: vlan device not reading gso max size of parent.Alexander Duyck2008-09-11
* netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep.David S. Miller2008-07-22
* Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds...David S. Miller2008-07-18
|\
| * Merge branch 'linus' into core/rcuIngo Molnar2008-06-16
| |\
| * | rcu: split list.h and move rcu-protected lists into rculist.hFranck Bui-Huu2008-05-19
* | | netdev: Allocate multiple queues for TX.David S. Miller2008-07-17
* | | vlan: remove unnecessary include statementsPatrick McHardy2008-07-15
* | | vlan: clean up hard_start_xmit functionsPatrick McHardy2008-07-15
* | | vlan: clean up vlan_dev_hard_header()Patrick McHardy2008-07-15
* | | vlan: ethtool ->get_flags supportPatrick McHardy2008-07-15
* | | vlan: deliver packets received with VLAN acceleration to network tapsPatrick McHardy2008-07-15
* | | 8021q: Check return of dev_set_promiscuity/allmultiWang Chen2008-07-14
* | | netdev: Move _xmit_lock and xmit_lock_owner into netdev_queue.David S. Miller2008-07-09
* | | vlan: avoid header copying and linearisation where possiblePatrick McHardy2008-07-08
* | | vlan: TCI related type and naming cleanupsPatrick McHardy2008-07-08
* | | vlan: move struct vlan_dev_info to private headerPatrick McHardy2008-07-08
* | | vlan: uninline __vlan_hwaccel_rxPatrick McHardy2008-07-08
* | | vlan: Add ethtool supportPatrick McHardy2008-07-08
* | | vlan: Use is_vlan_dev()Joonwoo Park2008-07-08
* | | vlan: fix network_header/mac_header adjustmentsPatrick McHardy2008-07-08
* | | vlan: Add GVRP supportPatrick McHardy2008-07-06
* | | vlan: Move device unregistration before lower dev cleanupPatrick McHardy2008-07-06
* | | vlan: Change vlan_dev_set_vlan_flag() to handle multiple flags at oncePatrick McHardy2008-07-06
| |/ |/|
* | vlan: Use bitmask of feature flags instead of seperate feature bitsPatrick McHardy2008-05-23
* | [VLAN]: Propagate selected feature bits to VLAN devicesPatrick McHardy2008-05-20
* | vlan: Correctly handle device notifications for layered VLAN devicesPatrick McHardy2008-05-20
|/
* vlan: assign PDE->data before gluing PDE into /proc treeDenis V. Lunev2008-05-02
* [VLAN]: Handle vlan devices net namespace changing.Pavel Emelyanov2008-04-16
* [VLAN]: Allow vlan devices registration in net namespaces.Pavel Emelyanov2008-04-16
* [VLAN]: Make the vlan_name_type per-net.Pavel Emelyanov2008-04-16
* [VLAN]: Make the /proc/net/vlan/conf file show per-net info.Pavel Emelyanov2008-04-16
* [VLAN]: Create proc entries in the proper net.Pavel Emelyanov2008-04-16
* [VLAN]: Add a net argument to proc init and cleanup calls.Pavel Emelyanov2008-04-16
* [VLAN]: Introduce the vlan_net structure and init/exit net ops.Pavel Emelyanov2008-04-16
* [VLAN]: Tag vlan_group_device with net device, not ifindex.Pavel Emelyanov2008-04-16
* Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/ne...David S. Miller2008-04-14
|\
| * [VLAN]: Fix egress priority mappings leak.Pavel Emelyanov2008-04-04
* | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/...David S. Miller2008-04-03
|\|
| * [VLAN]: Proc entry is not renamed when vlan device name changes.Pavel Emelyanov2008-04-02
* | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/...David S. Miller2008-03-27
|\|
| * [VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying devicePatrick McHardy2008-03-26
* | [VLAN]: Reduce memory consumed by vlan_groupsPavel Emelyanov2008-03-26
* | [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.YOSHIFUJI Hideaki2008-03-25
* | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/...David S. Miller2008-03-18
|\|
| * [8021Q]: vlan_dev misannotationsAl Viro2008-03-18
* | net: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-03-05
|/
* [8021Q]: Use proc_create() to setup ->proc_fops firstWang Chen2008-02-28
* [NET]: Restore sanity wrt. print_mac().David S. Miller2008-02-23
* net/8021q/vlan_dev.c: Use print_mac.Joe Perches2008-02-18
"%02X, values %02X, %02X\n", p[0], p[1], p[2]); break; } p += 3; len -= 3; break; case X25_FAC_CLASS_C: if (len < 4) return -1; printk(KERN_DEBUG "X.25: unknown facility %02X, " "values %02X, %02X, %02X\n", p[0], p[1], p[2], p[3]); p += 4; len -= 4; break; case X25_FAC_CLASS_D: if (len < p[1] + 2) return -1; switch (*p) { case X25_FAC_CALLING_AE: if (p[1] > X25_MAX_DTE_FACIL_LEN || p[1] <= 1) return -1; dte_facs->calling_len = p[2]; memcpy(dte_facs->calling_ae, &p[3], p[1] - 1); *vc_fac_mask |= X25_MASK_CALLING_AE; break; case X25_FAC_CALLED_AE: if (p[1] > X25_MAX_DTE_FACIL_LEN || p[1] <= 1) return -1; dte_facs->called_len = p[2]; memcpy(dte_facs->called_ae, &p[3], p[1] - 1); *vc_fac_mask |= X25_MASK_CALLED_AE; break; default: printk(KERN_DEBUG "X.25: unknown facility %02X," "length %d\n", p[0], p[1]); break; } len -= p[1] + 2; p += p[1] + 2; break; } } return p - skb->data; } /* * Create a set of facilities. */ int x25_create_facilities(unsigned char *buffer, struct x25_facilities *facilities, struct x25_dte_facilities *dte_facs, unsigned long facil_mask) { unsigned char *p = buffer + 1; int len; if (!facil_mask) { /* * Length of the facilities field in call_req or * call_accept packets */ buffer[0] = 0; len = 1; /* 1 byte for the length field */ return len; } if (facilities->reverse && (facil_mask & X25_MASK_REVERSE)) { *p++ = X25_FAC_REVERSE; *p++ = facilities->reverse; } if (facilities->throughput && (facil_mask & X25_MASK_THROUGHPUT)) { *p++ = X25_FAC_THROUGHPUT; *p++ = facilities->throughput; } if ((facilities->pacsize_in || facilities->pacsize_out) && (facil_mask & X25_MASK_PACKET_SIZE)) { *p++ = X25_FAC_PACKET_SIZE; *p++ = facilities->pacsize_in ? : facilities->pacsize_out; *p++ = facilities->pacsize_out ? : facilities->pacsize_in; } if ((facilities->winsize_in || facilities->winsize_out) && (facil_mask & X25_MASK_WINDOW_SIZE)) { *p++ = X25_FAC_WINDOW_SIZE; *p++ = facilities->winsize_in ? : facilities->winsize_out; *p++ = facilities->winsize_out ? : facilities->winsize_in; } if (facil_mask & (X25_MASK_CALLING_AE|X25_MASK_CALLED_AE)) { *p++ = X25_MARKER; *p++ = X25_DTE_SERVICES; } if (dte_facs->calling_len && (facil_mask & X25_MASK_CALLING_AE)) { unsigned bytecount = (dte_facs->calling_len + 1) >> 1; *p++ = X25_FAC_CALLING_AE; *p++ = 1 + bytecount; *p++ = dte_facs->calling_len; memcpy(p, dte_facs->calling_ae, bytecount); p += bytecount; } if (dte_facs->called_len && (facil_mask & X25_MASK_CALLED_AE)) { unsigned bytecount = (dte_facs->called_len % 2) ? dte_facs->called_len / 2 + 1 : dte_facs->called_len / 2; *p++ = X25_FAC_CALLED_AE; *p++ = 1 + bytecount; *p++ = dte_facs->called_len; memcpy(p, dte_facs->called_ae, bytecount); p+=bytecount; } len = p - buffer; buffer[0] = len - 1; return len; } /* * Try to reach a compromise on a set of facilities. * * The only real problem is with reverse charging. */ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) { struct x25_sock *x25 = x25_sk(sk); struct x25_facilities *ours = &x25->facilities; struct x25_facilities theirs; int len; memset(&theirs, 0, sizeof(theirs)); memcpy(new, ours, sizeof(*new)); len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask); if (len < 0) return len; /* * They want reverse charging, we won't accept it. */ if ((theirs.reverse & 0x01 ) && (ours->reverse & 0x01)) { SOCK_DEBUG(sk, "X.25: rejecting reverse charging request\n"); return -1; } new->reverse = theirs.reverse; if (theirs.throughput) { int theirs_in = theirs.throughput & 0x0f; int theirs_out = theirs.throughput & 0xf0; int ours_in = ours->throughput & 0x0f; int ours_out = ours->throughput & 0xf0; if (!ours_in || theirs_in < ours_in) { SOCK_DEBUG(sk, "X.25: inbound throughput negotiated\n"); new->throughput = (new->throughput & 0xf0) | theirs_in; } if (!ours_out || theirs_out < ours_out) { SOCK_DEBUG(sk, "X.25: outbound throughput negotiated\n"); new->throughput = (new->throughput & 0x0f) | theirs_out; } } if (theirs.pacsize_in && theirs.pacsize_out) { if (theirs.pacsize_in < ours->pacsize_in) { SOCK_DEBUG(sk, "X.25: packet size inwards negotiated down\n"); new->pacsize_in = theirs.pacsize_in; } if (theirs.pacsize_out < ours->pacsize_out) { SOCK_DEBUG(sk, "X.25: packet size outwards negotiated down\n"); new->pacsize_out = theirs.pacsize_out; } } if (theirs.winsize_in && theirs.winsize_out) { if (theirs.winsize_in < ours->winsize_in) { SOCK_DEBUG(sk, "X.25: window size inwards negotiated down\n"); new->winsize_in = theirs.winsize_in; } if (theirs.winsize_out < ours->winsize_out) { SOCK_DEBUG(sk, "X.25: window size outwards negotiated down\n"); new->winsize_out = theirs.winsize_out; } } return len; } /* * Limit values of certain facilities according to the capability of the * currently attached x25 link. */ void x25_limit_facilities(struct x25_facilities *facilities, struct x25_neigh *nb) { if (!nb->extended) { if (facilities->winsize_in > 7) { printk(KERN_DEBUG "X.25: incoming winsize limited to 7\n"); facilities->winsize_in = 7; } if (facilities->winsize_out > 7) { facilities->winsize_out = 7; printk( KERN_DEBUG "X.25: outgoing winsize limited to 7\n"); } } }