Bug #1090

RFC3542 support on DragonFly BSD.

Added by hds719 about 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hi All:

This patch is for the Google summer code project of "RFC3542 support
on DragonFlyBSD", for more detail please see the document "The Design
and implementation of RFC3542 support on DragonFly BSD.pdf" in
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/.
In this patch I have modify below eighteen files:
sys/netinet in_pcb.h ip6.h icmp6.h
sys/netinet6 in6.h ip6_output.c ip6_var.h raw_ip6.c
udp6_output.c ip6_input.c route6.c in6_pcb.c
lib/libc/net Makefile.inc rthdr.c
crypto/telnet/telnet commands.c
sys/net/pf pf_norm.c
sbin/ping6 ping6.c
lib/libcompat/4.3 rexec.c
usr.bin/telnet commands.c

And add below two files:
lib/libc/net inet6_rth_space.3 inet6_opt_init.3

Below are the related links to the codes.
Modified files:
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/in_pcb.h.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/ip6.h.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/icmp6.h.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/in6.h.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/ip6_output.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/ip6_var.h.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/raw_ip6.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/udp6_output.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/ip6_input.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/route6.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/in6_pcb.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/Makefile.inc.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/rthdr.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/crypto.commands.c.diff
(This is the diff file for src/crypto/telnet/telnet/commands.c)
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/pf_norm.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/ping6.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/rexec.c.diff
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/usr.bin.commands.c.diff
(This is the diff file for src/usr.bin/telnet/commands.c)

Added new files:
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/inet6_rth_space.3
http://leaf.dragonflybsd.org/~dhuang2/rfc3542/codes/inet6_opt_init.3

I have do some test on the codes, the detail test method is described
in the document "The Design and implementation of RFC3542 support on
DragonFly BSD.pdf"

Thanks!
Looking foreword to receive more advice on the project.
Best Wishes!
Huang Dashu

History

#1 Updated by hasso about 6 years ago

Good work. I'm sure there are guys making more comments and more detailed
review, but at first I have to kick myself not catching it earlier in the
progress - routing header type 0 is really obsolete - see RFC5095 3:
"IPv6 implementations are no longer required to implement RH0 in any
way.". Therefore most of code handling RH0 can be just removed. There is
just no point to preserve the code for compatibility with RFC2292.

It does not mean that inet6_rth_*() functions could be removed - these
have to stay as stubs (as they were AFAIK) and wait for code to handle
type2 headers. You should be also careful not breaking whole world via
removing members from structures, but the code handling these has to go
(as most of rthdr.c in the kernel and related code in the ping6 for
example).

PS. Note that in vacation and not able to participate in discussion much,
but I hope there are others who have opinion regarding the project :).

#2 Updated by hds719 about 6 years ago

Hi Hasso:
Thanks for comment, :)
The routing header type 0 is removed in the codes, I have make some
mistake in the document, and I will correct it now, :)
And the whole world is ok after rm routing header type 0, I have
change all the codes that related to routing header types 0, and
rebuild the world & kernel.
Thanks!
Have a good vocation!
Huang Dashu

#3 Updated by hds719 about 6 years ago

Hi Hasso:
Thanks for comment, :), I have send email too fast just now,
I now get what's you mean and will remove routing header type 0 from
my codes and document, and see RFC5095 for more detail.
Thanks for instruction.
Best wishes!
Huang Dashu

#4 Updated by hds719 about 6 years ago

Hi Hasso:
Thanks for comment, :), I have send email too fast just now,
I now get what's you mean and will remove routing header type 0 from
my codes and document, and see RFC5095 for more detail.
Thanks for instruction.
Best wishes!
Huang Dashu

On Sun, Jul 27, 2008 at 3:27 AM, Hasso Tepper
<> wrote:
>
> Hasso Tepper <> added the comment:
>
> Good work. I'm sure there are guys making more comments and more detailed
> review, but at first I have to kick myself not catching it earlier in the
> progress - routing header type 0 is really obsolete - see RFC5095 3:
> "IPv6 implementations are no longer required to implement RH0 in any
> way.". Therefore most of code handling RH0 can be just removed. There is
> just no point to preserve the code for compatibility with RFC2292.
>
> It does not mean that inet6_rth_*() functions could be removed - these
> have to stay as stubs (as they were AFAIK) and wait for code to handle
> type2 headers. You should be also careful not breaking whole world via
> removing members from structures, but the code handling these has to go
> (as most of rthdr.c in the kernel and related code in the ping6 for
> example).
>
> PS. Note that in vacation and not able to participate in discussion much,
> but I hope there are others who have opinion regarding the project :).
>
> ----------
> status: unread -> chatting
>
> _____________________________________________________
> DragonFly issue tracker <>
> <https://bugs.dragonflybsd.org/issue1090>
> _____________________________________________________
>

#5 Updated by hds719 about 6 years ago

Hi Hasso
Another question, in your email, you said that "There is just no point
to preserve the code for compatibility with RFC2292", do you mean all
the RFC2292 related codes that have been obsolete by RFC3542 should be
removed from the OS (for example inet6_option_space,
inet6_rthdr_add()), or you just mean we can remove RH0?
As I know, in current FreeBSD OS those old RFC2292 related API such as
"inet6_option_space(), inet6_rthdr_add()" are preserved.

Thanks!
Huang Dashu

#6 Updated by hasso about 6 years ago

Just RH0 related code of course. Preserving compatibility with RFC2292 in
general is must be.

And we must preserve it as well. You should be careful not to break whole
world of course by removing blindly all strings that contain "rth" :).
All inet6_rthdr_*() functions must exists (from both old and new API),
but there is no point to handle RH0 in these. For now where we don't
support type 2 routing headers these functions can be simple "return
something that shows we don't support any routing header type".

#7 Updated by hds719 about 6 years ago

Thanks! I get it, :).
Huang Dashu

#8 Updated by hds719 almost 6 years ago

Hi all:
I have remove RH0 from my codes and updated related document,
for more detail, please see http://leaf.dragonflybsd.org/~dhuang2/rfc3542/
Best Wishes!
Huang Dashu

#9 Updated by hasso almost 6 years ago

Committed.

Also available in: Atom PDF