search for: is_valid_ether_addr

Displaying 20 results from an estimated 30 matches for "is_valid_ether_addr".

2012 Feb 15
2
[PATCH v2 0/2] Part 2: handle addr_assign_type for random addresses
The second part of my patch series to fix the handling of addr_assign_type for random MAC addresses. This contains the trival changes from random_ether_addr() to new eth_hw_addr_random() and code to reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address where eth_mac_addr wasn't used. Danny Kukawka (2): net: replace random_ether_addr() with
2012 Feb 15
2
[PATCH v2 0/2] Part 2: handle addr_assign_type for random addresses
The second part of my patch series to fix the handling of addr_assign_type for random MAC addresses. This contains the trival changes from random_ether_addr() to new eth_hw_addr_random() and code to reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address where eth_mac_addr wasn't used. Danny Kukawka (2): net: replace random_ether_addr() with
2012 Feb 15
2
[PATCH v2 0/2] Part 2: handle addr_assign_type for random addresses
The second part of my patch series to fix the handling of addr_assign_type for random MAC addresses. This contains the trival changes from random_ether_addr() to new eth_hw_addr_random() and code to reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address where eth_mac_addr wasn't used. Danny Kukawka (2): net: replace random_ether_addr() with
2012 Feb 15
4
[RESEND][PATCH v2 0/2] Part 2: handle addr_assign_type for random addresses
The second part of my patch series to fix the handling of addr_assign_type for random MAC addresses. This contains the trival changes from random_ether_addr() to new eth_hw_addr_random() and code to reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address where eth_mac_addr wasn't used. Resend due to send with too long recipients list. Sorry! Thanks to Joe
2012 Feb 15
4
[RESEND][PATCH v2 0/2] Part 2: handle addr_assign_type for random addresses
The second part of my patch series to fix the handling of addr_assign_type for random MAC addresses. This contains the trival changes from random_ether_addr() to new eth_hw_addr_random() and code to reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address where eth_mac_addr wasn't used. Resend due to send with too long recipients list. Sorry! Thanks to Joe
2012 Feb 15
4
[RESEND][PATCH v2 0/2] Part 2: handle addr_assign_type for random addresses
The second part of my patch series to fix the handling of addr_assign_type for random MAC addresses. This contains the trival changes from random_ether_addr() to new eth_hw_addr_random() and code to reset the state to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address where eth_mac_addr wasn't used. Resend due to send with too long recipients list. Sorry! Thanks to Joe
2004 Oct 12
2
brctl troubles - more info
Just did a quick scan for that error message in the kernel source. Turns out it''s triggered in net/bridge/br_fdb.c:289. if (!is_valid_ether_addr(addr)) return -EADDRNOTAVAIL; Interestingly enough, it''s claiming that the mac addy isn''t any good! 8-( I''ll go add a printk line to that to see if I can determine what kind of data it''s getting to fdb_insert to cause this glitch... unless someo...
2012 Jun 28
7
[patch net-next 0/4] net: introduce and use IFF_LIFE_ADDR_CHANGE
three drivers updated, but this can be used in many others. Jiri Pirko (4): net: introduce new priv_flag indicating iface capable of change mac when running virtio_net: use IFF_LIFE_ADDR_CHANGE priv_flag team: use IFF_LIFE_ADDR_CHANGE priv_flag dummy: use IFF_LIFE_ADDR_CHANGE priv_flag drivers/net/dummy.c | 15 ++------------- drivers/net/team/team.c | 9 +++++----
2012 Jun 28
7
[patch net-next 0/4] net: introduce and use IFF_LIFE_ADDR_CHANGE
three drivers updated, but this can be used in many others. Jiri Pirko (4): net: introduce new priv_flag indicating iface capable of change mac when running virtio_net: use IFF_LIFE_ADDR_CHANGE priv_flag team: use IFF_LIFE_ADDR_CHANGE priv_flag dummy: use IFF_LIFE_ADDR_CHANGE priv_flag drivers/net/dummy.c | 15 ++------------- drivers/net/team/team.c | 9 +++++----
2012 Jun 29
5
[patch net-next v2 0/4] net: introduce and use IFF_LIFE_ADDR_CHANGE
three drivers updated, but this can be used in many others. v1->v2: %s/LIFE/LIVE Jiri Pirko (4): net: introduce new priv_flag indicating iface capable of change mac when running virtio_net: use IFF_LIVE_ADDR_CHANGE priv_flag team: use IFF_LIVE_ADDR_CHANGE priv_flag dummy: use IFF_LIVE_ADDR_CHANGE priv_flag drivers/net/dummy.c | 15 ++------------- drivers/net/team/team.c
2012 Jun 29
5
[patch net-next v2 0/4] net: introduce and use IFF_LIFE_ADDR_CHANGE
three drivers updated, but this can be used in many others. v1->v2: %s/LIFE/LIVE Jiri Pirko (4): net: introduce new priv_flag indicating iface capable of change mac when running virtio_net: use IFF_LIVE_ADDR_CHANGE priv_flag team: use IFF_LIVE_ADDR_CHANGE priv_flag dummy: use IFF_LIVE_ADDR_CHANGE priv_flag drivers/net/dummy.c | 15 ++------------- drivers/net/team/team.c
2013 Jan 21
4
[PATCH v5 0/3] make mac programming for virtio net more robust
Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Third patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore software address when fail to set hardware address V4: split eth_mac_addr, fix error handle V5: rebase patches to net-next tree Amos
2013 Jan 21
4
[PATCH v5 0/3] make mac programming for virtio net more robust
Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Third patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore software address when fail to set hardware address V4: split eth_mac_addr, fix error handle V5: rebase patches to net-next tree Amos
2007 Nov 27
1
[PATCH][BRIDGE] Properly dereference the br_should_route_hook
...nput.c +++ b/net/bridge/br_input.c @@ -122,6 +122,7 @@ static inline int is_link_local(const unsigned char *dest) struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) { const unsigned char *dest = eth_hdr(skb)->h_dest; + typeof(br_should_route_hook) rhook; if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) goto drop; @@ -147,9 +148,9 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) switch (p->state) { case BR_STATE_FORWARDING: - - if (br_should_route_hook) { - if (br_should_route_hook(skb)) + rhook = rcu_dereference(br_shou...
2007 Apr 18
0
[Bridge] [PATCH] (4/6) bridge: prevent bad forwarding table updates
...; int passedup = 0; + /* insert into forwarding database after filtering to avoid spoofing */ + br_fdb_update(p->br, p, eth_hdr(skb)->h_source); + if (br->dev->flags & IFF_PROMISC) { struct sk_buff *skb2; @@ -108,8 +111,7 @@ int br_handle_frame(struct net_bridge_po if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) goto err; - if (p->state == BR_STATE_LEARNING || - p->state == BR_STATE_FORWARDING) + if (p->state == BR_STATE_LEARNING) br_fdb_update(p->br, p, eth_hdr(skb)->h_source); if (p->br->stp_enabled && Index: bridge/net/bridge/br_st...
2007 Apr 18
0
[Bridge] [PATCH 2.4] (1/2) bridge - backport of API checking
...@ struct net_bridge_port *p; struct net_bridge_port **pptr; - if ((p = dev->br_port) == NULL) + if ((p = dev->br_port) == NULL || p->br != br) return -EINVAL; br_stp_disable_port(p); @@ -231,6 +232,9 @@ if (dev->hard_start_xmit == br_dev_xmit) return -ELOOP; + + if (!is_valid_ether_addr(dev->dev_addr)) + return -EADDRNOTAVAIL; dev_hold(dev); write_lock_bh(&br->lock);
2013 Jan 20
3
[PATCH v4 0/3] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com> Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Third patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore software address when fail to set hardware address V4: split eth_mac_addr, fix error handle
2013 Jan 20
3
[PATCH v4 0/3] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com> Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Third patch introduced a new vq control command to set mac address, it's atomic. V2: check return of sending command, delay eth_mac_addr() V3: restore software address when fail to set hardware address V4: split eth_mac_addr, fix error handle
2009 Jan 27
5
[PATCH 2/2] Add VMDq support to ixgbe
...tdev_priv(netdev); + struct ixgbe_hw *hw = &adapter->hw; + struct ixgbe_ring *rx_ring = &adapter->rx_ring[queue]; + + if ((queue < 0) || (queue > adapter->num_rx_queues)) { + return -EADDRNOTAVAIL; + } + + /* Note: Broadcast address is used to disable the MAC filter*/ + if (!is_valid_ether_addr(mac_addr)) { + + memset(rx_ring->mac_addr, 0xFF, ETH_ALEN); + + /* Clear RAR */ + IXGBE_WRITE_REG(hw, IXGBE_RAL(queue), 0); + IXGBE_WRITE_FLUSH(hw); + IXGBE_WRITE_REG(hw, IXGBE_RAH(queue), 0); + IXGBE_WRITE_FLUSH(hw); + + return -EADDRNOTAVAIL; + } + + /* Store in ring */ + memcpy(rx_ring...
2009 Nov 24
4
[Bridge] [PATCHv2 0/4] macvlan: add vepa and bridge mode
Second version, all feedback so far addressed, thanks for the help and interest! The patch to iproute2 has not changed, so I'm not including it this time. Patch 4/4 (the netlink interface) is basically unchanged as well but included for completeness. The other changes have moved forward a bit, to the point where I find them a lot cleaner and am more confident in the code being ready for