lwIP - A Lightweight TCP/IP stack - Patches: patch #8680, Add support for LwIP static route...
You are not allowed to post comments on this tracker with your current authentication level.
patch #8680: Add support for LwIP static route table
Submitter: | Pradip De <pradipde> | ||
Submitted: | Tue 02 Jun 2015 10:49:06 PM UTC | ||
Category: | IPv6 | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | None | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Mon 30 Jan 2017 07:09:43 PM UTC, comment #40: |
Pradip De <pradipde77> |
Thu 26 Jan 2017 02:38:26 PM UTC, comment #39: Task #14283 is for more detailed callbacks. Those won't give you a gateway address.
|
Simon Goldschmidt <goldsimon> |
Wed 25 Jan 2017 09:57:57 PM UTC, comment #38: In theory they could have been. Although, since those APIs are overloaded forms of some of the existing netif APIs, I felt it natural to include them in the same place. With this, they could be used with other static routing implementations as well.
|
Pradip De <pradipde77> |
Wed 25 Jan 2017 09:43:13 PM UTC, comment #37:
|
David van Moolenbroek <dcvmoole> |
Wed 25 Jan 2017 09:32:01 PM UTC, comment #36: The hooks that I was proposing earlier were about adding/deleting prefix routes in the routing table when an address is added/deleted to a netif. Currently, the core code does not have a place that these hooks can be placed in(because they need additional parameters supplied, e.g., gateway address) so I was thinking of adding 2 APIs in netif.c that could have these hooks embedded.
|
Pradip De <pradipde77> |
Wed 25 Jan 2017 08:59:21 PM UTC, comment #35: It did, now only one left :-)
|
Simon Goldschmidt <goldsimon> |
Wed 25 Jan 2017 08:56:06 PM UTC, comment #34:
|
David van Moolenbroek <dcvmoole> |
Wed 25 Jan 2017 08:32:50 PM UTC, comment #33: It is included in the unix port (it's in Filelists.mk) |
Dirk Ziegelmeier <dziegel> |
Wed 25 Jan 2017 08:22:37 PM UTC, comment #32:
|
Simon Goldschmidt <goldsimon> |
Sun 15 Jan 2017 04:10:41 PM UTC, comment #31: Pushed Pradip's patch to contrib. I'll leave this patch open, maybe you want to go on discussing the hooks? |
Dirk Ziegelmeier <dziegel> |
Wed 11 Jan 2017 09:26:02 PM UTC, comment #30: Attached a cleaned-up version of the patch (constness, unused args). |
Dirk Ziegelmeier <dziegel> |
Tue 10 Jan 2017 01:24:54 AM UTC, comment #29: Folks,
|
Pradip De <pradipde77> |
Thu 15 Dec 2016 09:20:13 PM UTC, comment #28: I have attached a README file StaticRouteTable.README for the route table implementation in lwip_rt_table_impl_for_contrib.diff.
|
Pradip De <pradipde77> |
Thu 15 Dec 2016 07:14:44 PM UTC, comment #27: By now I guess the additional functions to netif.c might not be generic enough to justify adding them.
|
Simon Goldschmidt <goldsimon> |
Thu 15 Dec 2016 04:25:59 PM UTC, comment #26: Alright, so I may have misunderstood the intention of your hooks. My assumption was that you do not control the netif calls to add addresses, so you needed hooks to be able to set routes at all. Now I understand that you do control the netif calls (otherwise, where is the gateway address coming from?) but prefer to have hooks for the route changes instead of having to make those route changes explicitly from your own code, in order to allow easier drop-in of the static-route implementation. If that is the case, then generalizing the hooks would indeed not make sense for you, and I have nothing meaningful to add to this discussion. :) |
David van Moolenbroek <dcvmoole> |
Wed 14 Dec 2016 11:49:35 PM UTC, comment #25: I understand, but I presume there is a limit to which we can generalize a hook. This limitation manifests itself in terms of the parameters that that hook is defined with.
|
Pradip De <pradipde77> |
Wed 14 Dec 2016 09:34:28 PM UTC, comment #24: Hmm.. wouldn't it then make more sense to make the hooks for local address addition and deletion (ie the events happening), rather than specifically for adding and deleting static routes (ie one use case for those hooks)?
|
David van Moolenbroek <dcvmoole> |
Wed 14 Dec 2016 09:18:57 PM UTC, comment #23: I'm not opposed to more hooks as long as they are cleanly separated and described. Having the netif_* functions might help to keep applications independent of the routing algorithm after all... |
Simon Goldschmidt <goldsimon> |
Wed 14 Dec 2016 09:16:41 PM UTC, comment #22: Thanks for the discussion and input and thanks David for the patches.
*/
|
Pradip De <pradipde77> |
Wed 14 Dec 2016 08:26:57 PM UTC, comment #21:
|
Simon Goldschmidt <goldsimon> |
Wed 14 Dec 2016 08:23:57 PM UTC, comment #20: Awesome! The new name is indeed better, long is better than vague.
|
David van Moolenbroek <dcvmoole> |
Wed 14 Dec 2016 08:09:03 PM UTC, comment #19: Thanks again for all the patches. I've applied them, only change the name of the new function (last patch) - it's not much better, but maybe a little more self explaining...?
|
Simon Goldschmidt <goldsimon> |
Wed 14 Dec 2016 04:36:43 PM UTC, comment #18: Oh, just to make sure: the actual patches were already attached to my last post. :)
|
David van Moolenbroek <dcvmoole> |
Wed 14 Dec 2016 02:58:08 PM UTC, comment #17: These changes are of course welcome, and as long as they don't add code for those of us not needing it, I'm fine with letting the linker throw unused code :-) so no #ifdefs should be needed.
|
Simon Goldschmidt <goldsimon> |
Wed 14 Dec 2016 02:33:55 PM UTC, comment #16: Alright, thank you!!
|
David van Moolenbroek <dcvmoole> |
Wed 14 Dec 2016 08:19:23 AM UTC, comment #15: I've reverted yesterday's hook and chosen the nd6 approach instead, which works for other link layers, too (like 6lowpan).
|
Simon Goldschmidt <goldsimon> |
Wed 14 Dec 2016 02:10:13 AM UTC, comment #14: Unfortunately, we are behind on updating to the latest LwIP master and I introduced some bugs in the patch while trying to align that to LwIP master. Apologies. I did not get a chance to test the patch to LwIP core.
|
Pradip De <pradipde77> |
Tue 13 Dec 2016 09:12:53 PM UTC, comment #13: Ah hehe. Cool, thanks. Generally speaking, as long as there is a hook at all I'm good. |
David van Moolenbroek <dcvmoole> |
Tue 13 Dec 2016 09:07:12 PM UTC, comment #12: Oops, I did not see your post. I'll have a look at your files tomorrow, I'm not fixed to Pradip's version of the hook. |
Simon Goldschmidt <goldsimon> |
Tue 13 Dec 2016 09:06:37 PM UTC, comment #11: Uh, okay. You're moving fast. The new hook will do I suppose, although my other patch here (the 0001 one) is still a relevant bugfix.. |
David van Moolenbroek <dcvmoole> |
Tue 13 Dec 2016 08:58:42 PM UTC, comment #10: I've pushed LWIP_HOOK_ETHIP6_GET_GW (slightly adapted) and fixed netif_add_ip6_address().
|
Simon Goldschmidt <goldsimon> |
Tue 13 Dec 2016 08:56:55 PM UTC, comment #9: FWIW! Here is what I came up with today. I've tested this version of the hook for two of the three purposes I had in mind (routing with gateway in case of router that does not advertise itself properly, routing with local address in case of multiple assigned ranges on the local network, and -yet untested- selection of a preferred router in the presence of multiple). Compared to Pradip's patch, I believe my version is closer to the IPv4 hook in that it checks local networks first. Also, it uses the destination cache the same way as the regular (ND-router based routing) case. But I for one would be just fine with Pradip's version of the hook (with the bug fixed) too, although I have no use for any of the rest either. |
David van Moolenbroek <dcvmoole> |
Tue 13 Dec 2016 08:39:05 PM UTC, comment #8: I'm sorry but I can't apply this:
|
Simon Goldschmidt <goldsimon> |
Tue 13 Dec 2016 07:00:08 PM UTC, comment #7: I have uploaded a couple of diff files containing updated route table implementation code.
|
Pradip De <pradipde77> |
Mon 12 Dec 2016 04:25:26 PM UTC, comment #6: I agree, maybe put it to contrib if it makes sense. |
Ivan Delamer <idelamer> |
Mon 12 Dec 2016 09:30:35 AM UTC, comment #5: Thanks for the input :-) If it's not part of the core code, using the hooks is definitively a good idea.
|
Simon Goldschmidt <goldsimon> |
Sun 11 Dec 2016 05:24:36 PM UTC, comment #4: I believe at that time I suggested using the hooks as well.
|
Ivan Delamer <idelamer> |
Fri 09 Dec 2016 12:53:42 PM UTC, comment #3: A patch would be very welcome! I also don't like the idea of this patch hijacking the hooks meant for external addons. I didn't mean to apply the patch as is...
|
Simon Goldschmidt <goldsimon> |
Fri 09 Dec 2016 12:40:18 PM UTC, comment #2: I for one think it would make more sense to provide the hooks and facilities to implement the actual routing outside of the lwIP core. Most importantly, that would match the current model for IPv4 as well. In addition, it would allow for a different implementation of the routing table.
|
David van Moolenbroek <dcvmoole> |
Fri 09 Dec 2016 11:51:20 AM UTC, comment #1: Does anyone really need/use this? If yes, I'd be OK to add it by now... :-) |
Simon Goldschmidt <goldsimon> |
Tue 02 Jun 2015 10:49:06 PM UTC, original submission:
Static route table management in LwIP.
|
Pradip De <pradipde> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 18 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-01-26 | goldsimon | Status | None | Done | |
Open/Closed | Open | Closed | |||
2017-01-11 | dziegel | Attached File | - | Added ipv6_static_routing.zip, #39442 | |
2016-12-15 | pradipde77 | Attached File | - | Added StaticRouteTable.README, #39243 | |
2016-12-14 | pradipde77 | Attached File | - | Added lwip_rt_table_impl_for_contrib.diff, #39229 | |
2016-12-14 | dcvmoole | Attached File | - | Added 0001-nd6-minor-static-consistency-fix.patch, #39226 | |
2016-12-14 | dcvmoole | Attached File | - | Added 0003-nd6-centralize-link-local-packet-send-decision.patch, #39223 | |
2016-12-14 | dcvmoole | Attached File | - | Added 0001-nd6-add-nd6_clear_destination_cache-function.patch, #39221 | |
Attached File | - | Added 0002-nd6-use-default_router_list-internally-only.patch, #39222 | |||
2016-12-13 | dcvmoole | Attached File | - | Added 0001-ethip6-forward-correct-error-code.patch, #39217 | |
Attached File | - | Added 0002-nd6-add-LWIP_HOOK_ND6_GET_GW-hook.patch, #39218 | |||
2016-12-13 | pradipde77 | Attached File | - | Added lwip_rt_table_impl.diff, #39213 | |
Attached File | - | Added lwip_core_changes_rt_table.diff, #39214 | |||
2016-12-12 | goldsimon | Status | Need Info | None | |
2016-12-09 | goldsimon | Status | None | Need Info | |
2015-06-16 | pde | Attached File | - | Added LwIP-Static-Routing2.diff, #34229 | |
2015-06-02 | pradipde | Attached File | - | Added LwIP-Static-Routing.diff, #34151 | |
Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-02a9.
Corresponding source code
Ok. I will defer to adding these helpers to the static routing code then.
Thanks everyone.