Revision 29239ba2 proto/ospf/config.Y

View differences:

proto/ospf/config.Y
42 42

  
43 43
  if ((ip->autype == OSPF_AUTH_NONE) && (ip->passwords != NULL))
44 44
    log(L_WARN "Password option without authentication option does not make sense");
45

  
46
  if (ip->passwords)
47
  {
48
    struct password_item *pass;
49
    WALK_LIST(pass, *ip->passwords)
50
    {
51
      if (pass->alg && (ip->autype != OSPF_AUTH_CRYPT))
52
	cf_error("Password algorithm option requires cryptographic authentication");
53

  
54
      /* Set default OSPF crypto algorithms */
55
      if (!pass->alg && (ip->autype == OSPF_AUTH_CRYPT))
56
	pass->alg = ospf_cfg_is_v2() ? ALG_MD5 : ALG_HMAC_SHA256;
57
    }
58
  }
45 59
}
46 60

  
47 61
static void

Also available in: Unified diff