X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-solaris.c;h=809b506a3640d34879fd8d9be303912bc81b5caa;hb=72cf4afe3c7ef808bde3f5cea02cb631e2eb6fec;hp=e0cd0be32e69dbb458b4cc2e67be89f3e6f75df9;hpb=952cfa5acc41ad4ceee160420a188a388bb340cf;p=ppp.git diff --git a/pppd/sys-solaris.c b/pppd/sys-solaris.c index e0cd0be..809b506 100644 --- a/pppd/sys-solaris.c +++ b/pppd/sys-solaris.c @@ -85,6 +85,10 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -127,6 +131,10 @@ #include #endif +#ifdef PPP_FILTER +#include +#endif + #include "pppd.h" #include "fsm.h" #include "lcp.h" @@ -258,7 +266,7 @@ static int get_hw_addr(char *, u_int32_t, struct sockaddr *); static int get_hw_addr_dlpi(char *, struct sockaddr *); static int dlpi_attach(int, int); static int dlpi_info_req(int); -static int dlpi_get_reply(int, union DL_primitives *, int, int); +static int dlpi_get_reply(int, union DL_primitives *, int, size_t); static int strioctl(int, int, void *, int, int); #ifdef SOL2 @@ -1499,7 +1507,7 @@ netif_get_mtu(int unit) error("ioctl(SIOCGIFMTU): %m (line %d)", __LINE__); return 0; } - return ifr.ifr_mtu; + return ifr.ifr_metric; } /* @@ -1636,33 +1644,6 @@ get_ppp_stats(int u, struct pppd_stats *stats) return 1; } -#if 0 -/* - * set_filters - transfer the pass and active filters to the kernel. - */ -int -set_filters(struct bpf_program *pass, struct bpf_program *active) -{ - int ret = 1; - - if (pass->bf_len > 0) { - if (strioctl(pppfd, PPPIO_PASSFILT, pass, - sizeof(struct bpf_program), 0) < 0) { - error("Couldn't set pass-filter in kernel: %m"); - ret = 0; - } - } - if (active->bf_len > 0) { - if (strioctl(pppfd, PPPIO_ACTIVEFILT, active, - sizeof(struct bpf_program), 0) < 0) { - error("Couldn't set active-filter in kernel: %m"); - ret = 0; - } - } - return ret; -} -#endif - /* * ccp_fatal_error - returns 1 if decompression was disabled as a * result of an error detected after decompression of a packet, @@ -2315,7 +2296,7 @@ dlpi_info_req(int fd) } static int -dlpi_get_reply(int fd, union DL_primitives *reply, int expected_prim, maxlen) +dlpi_get_reply(int fd, union DL_primitives *reply, int expected_prim, size_t maxlen) { struct strbuf buf; int flags, n;