X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-linux.c;h=b091030d708f4eafb29fcb66e0b7913f7356953e;hb=3e451dfe42426b51e6ce1d66a3e04de43e055568;hp=e23315a3486a583092aa9796e3d77a4f58a881dc;hpb=dbc8d9a8dac65f2b5299c24bd02f6b86de3246d7;p=ppp.git diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index e23315a..b091030 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -848,6 +848,30 @@ struct speed { #endif #ifdef B921600 { 921600, B921600 }, +#endif +#ifdef B1000000 + { 1000000, B1000000 }, +#endif +#ifdef B1152000 + { 1152000, B1152000 }, +#endif +#ifdef B1500000 + { 1500000, B1500000 }, +#endif +#ifdef B2000000 + { 2000000, B2000000 }, +#endif +#ifdef B2500000 + { 2500000, B2500000 }, +#endif +#ifdef B3000000 + { 3000000, B3000000 }, +#endif +#ifdef B3500000 + { 3500000, B3500000 }, +#endif +#ifdef B4000000 + { 4000000, B4000000 }, #endif { 0, 0 } }; @@ -2322,11 +2346,13 @@ int sifaddr (int unit, u_int32_t our_adr, u_int32_t his_adr, /* * Set the gateway address */ - SIN_ADDR(ifr.ifr_dstaddr) = his_adr; - if (ioctl(sock_fd, SIOCSIFDSTADDR, (caddr_t) &ifr) < 0) { - if (! ok_error (errno)) - error("ioctl(SIOCSIFDSTADDR): %m (line %d)", __LINE__); - return (0); + if (his_adr != 0) { + SIN_ADDR(ifr.ifr_dstaddr) = his_adr; + if (ioctl(sock_fd, SIOCSIFDSTADDR, (caddr_t) &ifr) < 0) { + if (! ok_error (errno)) + error("ioctl(SIOCSIFDSTADDR): %m (line %d)", __LINE__); + return (0); + } } /* * Set the netmask.