Revision 9b63e3a5

View differences:

proto/rip/config.Y
27 27
CF_KEYWORDS(RIP, INFINITY, METRIC, PORT, PERIOD, GARBAGETIME, PASSWORDS,
28 28
	    MODE, BROADCAST, QUIET, NOLISTEN, VERSION1, 
29 29
	    AUTHENTICATION, NONE, PLAINTEXT, MD5,
30
	    HONOUR, NEVER, NEIGHBOUR, ALWAYS,
30
	    HONOR, NEVER, NEIGHBOR, ALWAYS,
31 31
	    RIP_METRIC, RIP_TAG)
32 32

  
33 33
%type <i> rip_mode rip_auth
34 34

  
35 35
CF_GRAMMAR
36 36

  
37
CF_ADDTO(proto, RIP_CFG '}')
37
CF_ADDTO(proto, rip_cfg '}')
38 38

  
39
RIP_CFG_start: proto_start RIP {
39
rip_cfg_start: proto_start RIP {
40 40
     RIP_CFG = proto_config_new(&proto_rip, sizeof(struct rip_proto_config));
41 41
     rip_init_config(RIP_CFG);
42 42
   }
43 43
 ;
44 44

  
45
RIP_CFG:
46
   RIP_CFG_start proto_name '{'
47
 | RIP_CFG proto_item ';'
48
 | RIP_CFG INFINITY expr ';'	{ RIP_CFG->infinity = $3; }
49
 | RIP_CFG PORT expr ';'	{ RIP_CFG->port = $3; }
50
 | RIP_CFG PERIOD expr ';'	{ RIP_CFG->period = $3; }
51
 | RIP_CFG GARBAGETIME expr ';' { RIP_CFG->garbage_time = $3; }
52
 | RIP_CFG AUTHENTICATION rip_auth ';' {RIP_CFG->authtype = $3; }
53
 | RIP_CFG PASSWORDS '{' password_list '}' {RIP_CFG->passwords = $4; }
54
 | RIP_CFG HONOUR ALWAYS ';'    { RIP_CFG->honour = HO_ALWAYS; }
55
 | RIP_CFG HONOUR NEIGHBOUR ';'    { RIP_CFG->honour = HO_NEIGHBOUR; }
56
 | RIP_CFG HONOUR NEVER ';'    { RIP_CFG->honour = HO_NEVER; }
57
 | RIP_CFG rip_iface_list ';'
45
rip_cfg:
46
   rip_cfg_start proto_name '{'
47
 | rip_cfg proto_item ';'
48
 | rip_cfg INFINITY expr ';'	{ RIP_CFG->infinity = $3; }
49
 | rip_cfg PORT expr ';'	{ RIP_CFG->port = $3; }
50
 | rip_cfg PERIOD expr ';'	{ RIP_CFG->period = $3; }
51
 | rip_cfg GARBAGETIME expr ';' { RIP_CFG->garbage_time = $3; }
52
 | rip_cfg AUTHENTICATION rip_auth ';' {RIP_CFG->authtype = $3; }
53
 | rip_cfg PASSWORDS '{' password_list '}' {RIP_CFG->passwords = $4; }
54
 | rip_cfg HONOR ALWAYS ';'    { RIP_CFG->honor = HO_ALWAYS; }
55
 | rip_cfg HONOR NEIGHBOR ';'    { RIP_CFG->honor = HO_NEIGHBOR; }
56
 | rip_cfg HONOR NEVER ';'    { RIP_CFG->honor = HO_NEVER; }
57
 | rip_cfg rip_iface_list ';'
58 58
 ;
59 59

  
60 60
rip_auth:
proto/rip/rip.c
31 31
 * from two concurrent sends to one destination. Each &rip_interface has
32 32
 * at most one &rip_connection.
33 33
 *
34
 * We are not going to honour requests for sending part of
34
 * We are not going to honor requests for sending part of
35 35
 * routing table. That would need to turn split horizon off,
36 36
 * etc.  
37 37
 *
......
332 332

  
333 333
  switch( packet->heading.command ) {
334 334
  case RIPCMD_REQUEST: DBG( "Asked to send my routing table\n" ); 
335
	  if (P_CF->honour == HO_NEVER) {
335
	  if (P_CF->honor == HO_NEVER) {
336 336
	    log( L_REMOTE "They asked me to send routing table, but I was told not to do it" );
337 337
	    return 0;
338 338
	  }
339
	  if ((P_CF->honour == HO_NEIGHBOUR) && (!neigh_find( p, &whotoldme, 0 ))) {
340
	    log( L_REMOTE "They asked me to send routing table, but he is not my neighbour" );
339
	  if ((P_CF->honor == HO_NEIGHBOR) && (!neigh_find( p, &whotoldme, 0 ))) {
340
	    log( L_REMOTE "They asked me to send routing table, but he is not my neighbor" );
341 341
	    return 0;
342 342
	  }
343 343
    	  rip_sendto( p, whotoldme, port, HEAD(P->interfaces) ); /* no broadcast */
......
353 353
	  }
354 354

  
355 355
	  if (!neigh_find( p, &whotoldme, 0 )) {
356
	    log( L_REMOTE "%I send me routing info but he is not my neighbour", whotoldme );
356
	    log( L_REMOTE "%I send me routing info but he is not my neighbor", whotoldme );
357 357
#if 0
358 358
	    return 0;
359 359
#else
proto/rip/rip.h
133 133
#define AT_NONE 0
134 134
#define AT_PLAINTEXT 2
135 135
#define AT_MD5 3
136
  int honour;
136
  int honor;
137 137
#define HO_NEVER 0
138
#define HO_NEIGHBOUR 1
138
#define HO_NEIGHBOR 1
139 139
#define HO_ALWAYS 2
140 140
};
141 141

  

Also available in: Unified diff