search for: addr_len

Displaying 20 results from an estimated 132 matches for "addr_len".

2013 Jan 16
6
[PATCH v2 0/2] 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. Second patch introduced a new vq control command to set mac address in one time. V2: check return of sending command, delay eth_mac_addr() Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new
2013 Jan 16
6
[PATCH v2 0/2] 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. Second patch introduced a new vq control command to set mac address in one time. V2: check return of sending command, delay eth_mac_addr() Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new
1999 Nov 19
0
EGD socket problem ...
...ts without my bible in front of me, so can't play with this until at least Sunday :( The problem appears to be, in here, with the error generated by the 'fatal:' result when connect() is tested: char egd_message[2] = { 0x02, 0x00 }; struct sockaddr_un addr; int addr_len; memset(&addr, '\0', sizeof(addr)); addr.sun_family = AF_UNIX; /* FIXME: compile time check? */ if (sizeof(RANDOM_POOL) > sizeof(addr.sun_path)) fatal("Random pool path is too long"); strncpy(addr.sun_path, RANDOM_P...
2011 Aug 13
2
[PATCH] virtio-net: Read MAC only after initializing MSI-X
...amp;& gso) case will be fixed by register_netdev() */ } - /* Configuration may specify what MAC to use. Otherwise random. */ - if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { - vdev->config->get(vdev, - offsetof(struct virtio_net_config, mac), - dev->dev_addr, dev->addr_len); - } else - random_ether_addr(dev->dev_addr); - /* Set up our device-specific information */ vi = netdev_priv(dev); netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight); @@ -1032,6 +1024,14 @@ static int virtnet_probe(struct virtio_device *vdev) dev->features |= NETIF_...
2011 Aug 13
2
[PATCH] virtio-net: Read MAC only after initializing MSI-X
...amp;& gso) case will be fixed by register_netdev() */ } - /* Configuration may specify what MAC to use. Otherwise random. */ - if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { - vdev->config->get(vdev, - offsetof(struct virtio_net_config, mac), - dev->dev_addr, dev->addr_len); - } else - random_ether_addr(dev->dev_addr); - /* Set up our device-specific information */ vi = netdev_priv(dev); netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight); @@ -1032,6 +1024,14 @@ static int virtnet_probe(struct virtio_device *vdev) dev->features |= NETIF_...
2001 Feb 13
4
issue with EGD in openssh
...IPE, SIG_IGN); + /* Parse command-line arguments. */ while ((opt = getopt(ac, av, "f:p:b:k:h:g:V:u:diqQ46")) != EOF) { switch (opt) { --- entropy.c.DIST Mon Oct 16 03:13:43 2000 +++ entropy.c Mon Feb 12 11:00:53 2001 @@ -69,6 +69,7 @@ char msg[2]; struct sockaddr_un addr; int addr_len; + int i, rval; /* Sanity checks */ if (sizeof(EGD_SOCKET) > sizeof(addr.sun_path)) @@ -81,13 +82,25 @@ strlcpy(addr.sun_path, EGD_SOCKET, sizeof(addr.sun_path)); addr_len = offsetof(struct sockaddr_un, sun_path) + sizeof(EGD_SOCKET); +reopen: fd = socket(AF_UNIX, SOCK_STREAM, 0);...
2005 Jun 12
2
%h,%p,%u expansion for ControlPath
This allows me to set 'ControlPath ~/.ssh/sockets/%h.%p.%u' for example. Have I missed a good reason why ssh_connect finds the default port number for itself instead of just having it in options.port (like we do for the the default in options.user)? --- openssh-4.1p1/ssh.c~ 2005-06-12 09:47:18.000000000 +0100 +++ openssh-4.1p1/ssh.c 2005-06-12 09:40:53.000000000 +0100 @@ -604,6 +604,17
2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
...oc(sizeof(*addr), GFP_KERNEL); + if (!addr) + return -ENOMEM; + memcpy(addr, p, sizeof(*addr)); + + ret = eth_prepare_mac_addr_change(dev, addr); if (ret) - return ret; + goto out; if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR)) { sg_init_one(&sg, addr->sa_data, dev->addr_len); @@ -982,7 +987,8 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p) VIRTIO_NET_CTRL_MAC_ADDR_SET, &sg)) { dev_warn(&vdev->dev, "Failed to set mac address by vq command.\n"); - return -EINVAL; + ret = -EINVAL; + goto out; } } el...
2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
...oc(sizeof(*addr), GFP_KERNEL); + if (!addr) + return -ENOMEM; + memcpy(addr, p, sizeof(*addr)); + + ret = eth_prepare_mac_addr_change(dev, addr); if (ret) - return ret; + goto out; if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR)) { sg_init_one(&sg, addr->sa_data, dev->addr_len); @@ -982,7 +987,8 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p) VIRTIO_NET_CTRL_MAC_ADDR_SET, &sg)) { dev_warn(&vdev->dev, "Failed to set mac address by vq command.\n"); - return -EINVAL; + ret = -EINVAL; + goto out; } } el...
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
2011 Aug 14
2
[PATCH 1/3] virtio-console: Use virtio_config_val() for retrieving config
This patch modifies virtio-console to use virtio_config_val() instead of a 'if(virtio_has_feature()) vdev->config->get()' construct to retrieve optional values from the config space. Cc: Amit Shah <amit.shah at redhat.com> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: virtualization at
2011 Aug 14
2
[PATCH 1/3] virtio-console: Use virtio_config_val() for retrieving config
This patch modifies virtio-console to use virtio_config_val() instead of a 'if(virtio_has_feature()) vdev->config->get()' construct to retrieve optional values from the config space. Cc: Amit Shah <amit.shah at redhat.com> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: virtualization at
2007 Aug 03
1
race condition with ControlMaster=auto
...SIONALLY POOR. -------------- next part -------------- --- ssh.c~ Fri Jan 5 05:30:17 2007 +++ ssh.c Fri Aug 3 19:21:18 2007 @@ -1045,18 +1045,19 @@ } } -static void -ssh_control_listener(void) +static int +ssh_control_listener(int test) { struct sockaddr_un addr; mode_t old_umask; int addr_len; if (options.control_path == NULL || - options.control_master == SSHCTL_MASTER_NO) - return; + options.control_master == SSHCTL_MASTER_NO || + control_fd != -1) + return 1; - debug("setting up multiplex master socket"); + debug("trying to set up multiplex master s...
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