diff -bru ucarp-1.5.2.orig/src/carp.c ucarp-1.5.2/src/carp.c --- ucarp-1.5.2.orig/src/carp.c 2010-01-31 22:59:12.000000000 +0100 +++ ucarp-1.5.2/src/carp.c 2013-07-04 15:36:14.000000000 +0200 @@ -247,12 +247,7 @@ sum = cksum(&ch, sizeof ch); ch.carp_cksum = htons(sum); - eh.ether_shost[0] = 0x00; - eh.ether_shost[1] = 0x00; - eh.ether_shost[2] = 0x5e; - eh.ether_shost[3] = 0x00; - eh.ether_shost[4] = 0x00; - eh.ether_shost[5] = vhid; + memcpy(&eh.ether_shost, hwaddr, sizeof hwaddr); if (no_mcast) { eh.ether_dhost[0] = 0xff; @@ -869,6 +864,9 @@ if ((pfds[0].revents & (POLLERR | POLLHUP)) != 0) { logfile(LOG_ERR, _("exiting: pfds[0].revents = %d"), pfds[0].revents); + if ((sc.sc_state != BACKUP) && (shutdown_at_exit != 0)) { + (void) spawn_handler(dev_desc_fd, downscript); + } break; } if (gettimeofday(&now, NULL) != 0) { diff -bru ucarp-1.5.2.orig/src/ucarp_p.h ucarp-1.5.2/src/ucarp_p.h --- ucarp-1.5.2.orig/src/ucarp_p.h 2009-05-27 23:39:23.000000000 +0200 +++ ucarp-1.5.2/src/ucarp_p.h 2013-07-04 09:20:28.000000000 +0200 @@ -1,7 +1,7 @@ #ifndef __CARP_P_H__ #define __CARP_P_H__ 1 -static const char *GETOPT_OPTIONS = "i:s:v:p:Pa:hb:k:x:nu:d:r:zf:BoSM"; +static const char *GETOPT_OPTIONS = "i:s:v:p:Pa:hb:k:x:nu:d:r:zf:Bo:SM"; static struct option long_options[] = { { "interface", 1, NULL, 'i' },