/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2017-02-22 21:45:35 UTC
  • Revision ID: teddy@recompile.se-20170222214535-milf6w0b1krwpaex
Server bug fix: Use the mandos.conf "zeroconf" and "restore" options

Allow the "zeroconf" and "restore" options to actually work from the
mandos.conf file, in addition to command line options.

Closes: 855589
Reported-by: Pablo Abelenda <pabelenda@igalia.com>
Suggested-by: Pablo Abelenda <pabelenda@igalia.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
626
626
                     safer_gnutls_strerror(ret));
627
627
        dhparamsfilename = NULL;
628
628
      }
 
629
      free(params.data);
629
630
    } while(false);
630
631
  }
631
632
  if(dhparamsfilename == NULL){
1078
1079
    bool match = false;
1079
1080
    {
1080
1081
      char *interface = NULL;
1081
 
      while((interface=argz_next(mc->interfaces, mc->interfaces_size,
1082
 
                                 interface))){
 
1082
      while((interface = argz_next(mc->interfaces,
 
1083
                                   mc->interfaces_size,
 
1084
                                   interface))){
1083
1085
        if(if_nametoindex(interface) == (unsigned int)if_index){
1084
1086
          match = true;
1085
1087
          break;
1492
1494
  return retval;
1493
1495
}
1494
1496
 
1495
 
__attribute__((nonnull))
1496
1497
static void resolve_callback(AvahiSServiceResolver *r,
1497
1498
                             AvahiIfIndex interface,
1498
1499
                             AvahiProtocol proto,
2195
2196
  
2196
2197
  /* Sleep checking until interface is running.
2197
2198
     Check every 0.25s, up to total time of delay */
2198
 
  for(int i=0; i < delay * 4; i++){
 
2199
  for(int i = 0; i < delay * 4; i++){
2199
2200
    if(interface_is_running(interface)){
2200
2201
      break;
2201
2202
    }
3022
3023
      /* Take down the network interfaces which were brought up */
3023
3024
      {
3024
3025
        char *interface = NULL;
3025
 
        while((interface=argz_next(interfaces_to_take_down,
3026
 
                                   interfaces_to_take_down_size,
3027
 
                                   interface))){
 
3026
        while((interface = argz_next(interfaces_to_take_down,
 
3027
                                     interfaces_to_take_down_size,
 
3028
                                     interface))){
3028
3029
          ret = take_down_interface(interface);
3029
3030
          if(ret != 0){
3030
3031
            errno = ret;