Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 99190 | Differences between
and this patch

Collapse All | Expand All

(-)isdn4k-utils-CVS-2005-06-26.orig/ipppd/options.c (-2 / +25 lines)
Lines 2633-2638 Link Here
2633
2633
2634
#ifdef IPPP_FILTER
2634
#ifdef IPPP_FILTER
2635
2635
2636
#if !defined(DLT_PPP_WITHDIRECTION) && defined(DLT_PPP_WITH_DIRECTION)
2637
#define DLT_PPP_WITHDIRECTION DLT_PPP_WITH_DIRECTION
2638
#endif
2639
2636
#ifndef DLT_PPP_WITHDIRECTION
2640
#ifndef DLT_PPP_WITHDIRECTION
2637
#define DLT_PPP_WITHDIRECTION	DLT_PPP
2641
#define DLT_PPP_WITHDIRECTION	DLT_PPP
2638
#warning "please update your pcap version to support in/outbound DLT_PPP_WITHDIRECTION filter"
2642
#warning "please update your pcap version to support in/outbound DLT_PPP_WITHDIRECTION filter"
Lines 2646-2654 Link Here
2646
    int argc;
2650
    int argc;
2647
    char **argv;
2651
    char **argv;
2648
{
2652
{
2649
    if (pcap_compile_nopcap(PPP_HDRLEN, DLT_PPP_WITHDIRECTION, &pass_filter, *argv, 1, netmask) == 0)
2653
    pcap_t* pc = pcap_open_dead (DLT_PPP_WITHDIRECTION, PPP_HDRLEN);
2654
    if (!pc) {
2655
        option_error("error in pass-filter expression: pcap_open_dead failed\n");
2656
        return 0;
2657
    }
2658
2659
    if (pcap_compile(pc, &pass_filter, *argv, 1, netmask) == 0) {
2660
        pcap_close (pc);
2650
        return 1;
2661
        return 1;
2662
    }
2651
    option_error("error in pass-filter expression.\n");
2663
    option_error("error in pass-filter expression.\n");
2664
    pcap_close (pc);
2652
    return 0;
2665
    return 0;
2653
}
2666
}
2654
2667
Lines 2660-2668 Link Here
2660
    int argc;
2673
    int argc;
2661
    char **argv;
2674
    char **argv;
2662
{
2675
{
2663
    if (pcap_compile_nopcap(PPP_HDRLEN, DLT_PPP_WITHDIRECTION, &active_filter, *argv, 1, netmask) == 0)
2676
    pcap_t* pc = pcap_open_dead (DLT_PPP_WITHDIRECTION, PPP_HDRLEN);
2677
    if (!pc) {
2678
        option_error("error in active-filter expression: pcap_open_dead failed\n");
2679
        return 0;
2680
    }
2681
2682
    if (pcap_compile(pc, &active_filter, *argv, 1, netmask) == 0) {
2683
        pcap_close (pc);
2664
        return 1;
2684
        return 1;
2685
    }
2686
2665
    option_error("error in active-filter expression.\n");
2687
    option_error("error in active-filter expression.\n");
2688
    pcap_close (pc);
2666
    return 0;
2689
    return 0;
2667
}
2690
}
2668
#endif /* IPPP_FILTER */
2691
#endif /* IPPP_FILTER */

Return to bug 99190