Changeset ddd16bc in rtems-libbsd


Ignore:
Timestamp:
Nov 7, 2017, 10:54:39 AM (3 years ago)
Author:
Christian Mauderer <Christian.Mauderer@…>
Branches:
b96abfd647154f10ea8f7fac68e25676636eded5, 13421d06177df03916665bb2f3a7fcadc51a951b, d964a6703c705cc92fd053bcefc08bb3b6baa0e2, b1e67a2bdc575f7f6e0af4922d7adb91545827ca
Children:
cf8e1d4
Parents:
e5abb31
git-author:
Christian Mauderer <Christian.Mauderer@…> (11/07/17 10:54:39)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/10/17 12:33:03)
Message:

dhcpcd: Don't ignore interface on transient errors.

In case of WPA on a WiFi? interface, the interface isn't yet ready when
the dhcpcd starts. Sending a packet during that time returns with a
ENOBUFS. That caused the interface to be ignored.

On the upstream repository of dhcpcd, that transient error (and some
others) are already ignored.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dhcpcd/dhcp.c

    re5abb31 rddd16bc  
    14881488        in_addr_t a = 0;
    14891489        struct timeval tv;
     1490#ifdef __rtems__
     1491        int errno_save;
     1492#endif /* __rtems__ */
    14901493
    14911494        if (!callback)
     
    15451548                        return;
    15461549                r = ipv4_sendrawpacket(iface, ETHERTYPE_IP, udp, len);
     1550#ifdef __rtems__
     1551                errno_save = errno;
     1552#endif /* __rtems__ */
    15471553                free(udp);
    15481554                /* If we failed to send a raw packet this normally means
     
    15541560                        syslog(LOG_ERR, "%s: ipv4_sendrawpacket: %m",
    15551561                            iface->name);
     1562#ifdef __rtems__
     1563                        if (errno_save != ENETDOWN &&
     1564                            errno_save != ENETRESET &&
     1565                            errno_save != ENETUNREACH &&
     1566                            errno_save != ENOBUFS) {
     1567#endif /* __rtems__ */
    15561568                        if (!(options & DHCPCD_TEST))
    15571569                                dhcp_drop(iface, "FAIL");
     
    15591571                        eloop_timeout_delete(NULL, iface);
    15601572                        callback = NULL;
     1573#ifdef __rtems__
     1574                        }
     1575#endif /* __rtems__ */
    15611576                }
    15621577        }
Note: See TracChangeset for help on using the changeset viewer.