[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netbsd,07894] check v6 in v6 header in ALTQ
- To: netbsd@xxxxxxxxxxxxx
- Subject: [netbsd,07894] check v6 in v6 header in ALTQ
- From: HAMAJIMA Katsuomi/濱嶋克臣 <hamajima@xxxxxxxxxxxxxxxx>
- Date: Wed, 31 Jul 2002 23:48:30 +0900 (JST)
濱嶋です。
altqがxcast6のパケットを正しく処理してくれないので調べていたのですが、
ネットワークまわりのこと全然分かっていないので、これで正しいのか教えて
下さい。
xcast6のratやvicのヘッダは、
v6 -> hop-by-hop -> v6 -> routing(xcast) -> udp
の順になっているのですが、途中で出てくるv6 headerを認識しないようです。
それで以下のようなコードを追加してみたら、何となく動いているようないな
いような感じです。こんなのであっているのでしょうか?
Index: altq_subr.c
===================================================================
RCS file: /anoncvs/syssrc/sys/altq/altq_subr.c,v
retrieving revision 1.8
diff -u -r1.8 altq_subr.c
--- altq_subr.c 2002/03/05 04:12:57 1.8
+++ altq_subr.c 2002/07/31 14:19:01
@@ -729,6 +729,17 @@
break;
}
+ case IPPROTO_IPV6: {
+ /* get next header and header length */
+ struct ip6_hdr *ip6;
+
+ ip6 = (struct ip6_hdr *)(mtod(m0, struct ip6_hdr *) + off);
+ proto = ip6->ip6_nxt;
+ off += sizeof(struct ip6_hdr);
+ /* goto the next header */
+ break;
+ }
+
case IPPROTO_FRAGMENT:
/* ipv6 fragmentations are not supported yet */
default: