Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pathanalysis] BDDReachability chooses IP protocol 0 when unconstrained, confusing users #2438

Closed
dhalperi opened this issue Oct 11, 2018 · 5 comments
Assignees

Comments

@dhalperi
Copy link
Member

@anothermattbrown I know why this is happening, but this is probably counter intuitive. E.g., updating refs:

@@ -861,13 +861,13 @@
                 "dstPort" : 0,
                 "ecn" : 0,
                 "fragmentOffset" : 0,
-                "icmpCode" : 255,
-                "icmpVar" : 255,
+                "icmpCode" : 0,
+                "icmpVar" : 0,
                 "ingressNode" : "as3core1",
                 "ingressVrf" : "default",
-                "ipProtocol" : "IP",
+                "ipProtocol" : "HOPOPT",
                 "packetLength" : 0,
-                "srcIp" : "2.255.255.255",
+                "srcIp" : "2.0.0.0",
                 "srcPort" : 0,
                 "state" : "NEW",
                 "tag" : "BASE",

it's nice that values are now taking on minimums, but maybe there's a "smarter" thing we can do for picking a representative IP protocol?

@anothermattbrown
Copy link
Contributor

When we prefer certain options, we can simply add an additional constraint before asking for the representative. If the BDD is unsatisfiable with that constraint, then we rollback. We can easily generalize this to a prioritized list of values, etc.

If this seems reasonable, what's a good list of (in descending order of preference) for the values to try? Do we want to do this for other fields as well? Combinations of fields?

@anothermattbrown
Copy link
Contributor

Another approach: we can test whether the field is constrained in the BDD and if so avoid picking a representative for that field. One complication is that there are in general many ways of satisfying a BDD, and only some of them include a constraint on the field. So we could first choose the shortest implicant (a single path to the 1 node), and then test which fields are constrained by that path. This may be too complicated in case we need to explain it to users.

@dhalperi
Copy link
Member Author

dhalperi commented Oct 11, 2018

Aside priority-wise -- certainly don't think this is a blocker -- we may have been "getting lucky" with NoD since it tends to pick values it sees used... but worth thinking about.

I think your idea of "favorite parameters (TCP -> UDP -> ?)" may be a good one. not sure tho.

@saparikh
Copy link
Contributor

Perhaps start with ICMP with type and codes for echo request and then go for UDP with the port commonly used for traceroute and then well known TCP ports (SSH, HTTP, HTTPS, DNS, etc...)?

@dhalperi dhalperi changed the title BDDReachability chooses IP protocol 0 when unconstrained, confusing users [pathanalysis] BDDReachability chooses IP protocol 0 when unconstrained, confusing users Nov 5, 2018
@yifeiyuan
Copy link
Contributor

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants