Revision b21f68b4 proto/ospf/packet.c

View differences:

proto/ospf/packet.c
41 41
void
42 42
ospf_pkt_finalize(struct ospf_iface *ifa, struct ospf_packet *pkt)
43 43
{
44
  struct password_item *passwd = password_find (ifa->passwords);
44
  struct password_item *passwd = NULL;
45 45
  void *tail;
46 46
  struct MD5Context ctxt;
47 47
  char password[OSPF_AUTH_CRYPT_SIZE];
......
52 52
  {
53 53
    case OSPF_AUTH_SIMPLE:
54 54
      bzero(&pkt->u, sizeof(union ospf_auth));
55
      passwd = password_find(ifa->passwords, 1);
55 56
      if (!passwd)
56 57
      {
57 58
        log( L_ERR "No suitable password found for authentication" );
......
65 66
				  sizeof(struct ospf_packet), NULL);
66 67
      break;
67 68
    case OSPF_AUTH_CRYPT:
69
      passwd = password_find(ifa->passwords, 0);
68 70
      if (!passwd)
69 71
      {
70 72
        log( L_ERR "No suitable password found for authentication" );
......
123 125
      return 1;
124 126
      break;
125 127
    case OSPF_AUTH_SIMPLE:
126
      pass = password_find (ifa->passwords);
128
      pass = password_find(ifa->passwords, 1);
127 129
      if(!pass)
128 130
      {
129 131
        OSPF_TRACE(D_PACKETS, "OSPF_auth: no password found");

Also available in: Unified diff