Revision 1a509a63

View differences:

bird.conf
33 33
	passwords { password "ahoj" from 0 to 10;
34 34
		password "nazdar" from 10;
35 35
	}
36
	authentication plaintext;
36
	authentication md5;
37 37
}
38 38

  
39 39
protocol device {
proto/rip/auth.c
56 56
      struct password_item *head;
57 57
      struct rip_md5_tail *tail;
58 58

  
59
      if (block->packetlen != PACKETLEN(num) + 20) {
59
      if (block->packetlen != PACKETLEN(num)) {
60 60
	log( L_ERR "packetlen in md5 does not match computed value\n" );
61 61
	return 1;
62 62
      }
......
145 145
      MD5Init(&ctxt);
146 146
      MD5Update(&ctxt, (char *) packet, block->packetlen );
147 147
      MD5Final((char *) (&tail->md5), &ctxt);
148
      return block->packetlen;
148
      return PACKETLEN(num) + block->authlen;
149 149
    }
150 150
  default:
151 151
    bug( "Uknown authtype in outgoing authentication?\n" );
proto/rip/rip.c
352 352
	    struct rip_block *block = &packet->block[i];
353 353
	    if (block->family == 0xffff) {
354 354
	      if (i)
355
		BAD( "Authentication header is not the first" );
355
		continue;	/* md5 tail has this family */
356 356
	      if (rip_incoming_authentication(p, (void *) block, packet, num))
357 357
		BAD( "Authentication failed" );
358 358
	      authenticated = 1;
proto/rip/rip.h
28 28
  int done;
29 29
};
30 30

  
31
struct rip_packet_heading {
31
struct rip_packet_heading {		/* 4 bytes */
32 32
  u8 command;
33 33
#define RIPCMD_REQUEST          1       /* want info */
34 34
#define RIPCMD_RESPONSE         2       /* responding to request */

Also available in: Unified diff