[Click] Segmentation Faults with IPClassifier
Beyers Cronje
bcronje at gmail.com
Sat Jun 9 16:39:28 EDT 2007
In actual fact you would typically use a protocol Classifier for IP packets
before CheckIPHeader. I.e.
FromDevice(eth0)
-> c0 :: Classifier(12/0800, -); // Output 0 for all IP packets, output 1
for non-IP packets
c0[0] -> Strip(14) -> CheckIPHeader -> ........
c0[1] -> Discard; // ARP etc packets
You can also use MarkIPHeader instead of CheckIPHeader. Also you can do away
with the Strip element by specifying the offset of the IP Header in
MarkIPHeader/CheckIPHeader i.e. CheckIPHeader(14). This can be helpful if
you plan to analyze/manipulate the ethernet headers.
Beyers
On 6/8/07, Roman Chertov <rchertov at purdue.edu> wrote:
>
> I think you need a CheckIPheader element there as well as a Strip.
> Packets from FromDevice come in with Ethernet headers and IP elements
> expect the very first byte to be of the IP header.
>
> FromDevice(eth0)
> -> Strip(14)
> -> CheckIPHeader2(0)
> -> Filter[0]
> -> Discard();
>
> Roman
>
> dmoore7 at nd.edu wrote:
> > Hello,
> > I am attempting to build basic click configurations, and work up, but am
> having
> > trouble building fairly straightforward systems. For example:
> >
> > Filter :: IPClassifier(dst 129.74.20.20, true)
> > FromDevice(eth0) -> Filter[0] -> Discard();
> > Filter[1] -> Print(ok) -> Discard();
> >
> > Here 129.74.20.20 is my machine's address. This configuration causes a
> > segmentation fault, with no errors otherwise. If I flip the two
> filters,
> > putting "true" first, then it builds and runs without error.
> >
> > What am I doing wrong?
> > Any input is appreciated.
> > Thanks,
> > - David Moore
> >
> >
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
More information about the click
mailing list