On 2011-07-04, Scott McEachern <sc...@blackstaff.ca> wrote:
> I gave the most recent snapshot (June 29) a try, and the problem 
> remains, so I'll try sending this "again".  I haven't seen anything 
> about this on the list since; surely I can't be the only person who has 
> run into this.

does this help?


Index: client.c
===================================================================
RCS file: /cvs/src/usr.sbin/pppoe/client.c,v
retrieving revision 1.22
diff -u -p -r1.22 client.c
--- client.c    31 Mar 2011 09:19:35 -0000      1.22
+++ client.c    4 Jul 2011 14:56:05 -0000
@@ -274,6 +274,7 @@ send_padr(int bfd, u_int8_t *srv, struct
        }
 
        ph->len = htons(ph->len);
+       tag_hton(tl);
 
        client_state = STATE_EXPECT_PADS;
        return (writev(bfd, iov, idx));
Index: pppoe.h
===================================================================
RCS file: /cvs/src/usr.sbin/pppoe/pppoe.h,v
retrieving revision 1.8
diff -u -p -r1.8 pppoe.h
--- pppoe.h     31 Mar 2011 09:19:35 -0000      1.8
+++ pppoe.h     4 Jul 2011 14:56:05 -0000
@@ -103,6 +103,7 @@ void tag_destroy(struct tag_list *);
 struct tag_node *tag_lookup(struct tag_list *, u_int16_t, int);
 int tag_add(struct tag_list *, u_int16_t, u_int16_t, u_int8_t *);
 int tag_pkt(struct tag_list *, u_long, u_int8_t *);
+void tag_hton(struct tag_list *);
 
 struct pppoe_session {
        LIST_ENTRY(pppoe_session)       s_next;
Index: tag.c
===================================================================
RCS file: /cvs/src/usr.sbin/pppoe/tag.c,v
retrieving revision 1.3
diff -u -p -r1.3 tag.c
--- tag.c       31 Mar 2011 09:19:35 -0000      1.3
+++ tag.c       4 Jul 2011 14:56:05 -0000
@@ -143,3 +143,14 @@ tag_pkt(struct tag_list *l, u_long pktle
                return (-1);
        return (0);
 }
+
+void
+tag_hton(struct tag_list *l)
+{
+       struct tag_node *p;
+
+       for (p = LIST_FIRST(&l->thelist); p; p = LIST_NEXT(p, next)) {
+               p->len = htons(p->len);
+               p->type = htons(p->type);
+       }
+}

Reply via email to