File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,19 +138,23 @@ int connection_open_listener(struct scache_bind ibind) {
138138 tobind.servaddr .sin_family = ibind.af ;
139139 memcpy (&tobind.servaddr .sin_addr .s_addr , &ibind.addr , sizeof (tobind.servaddr .sin_addr .s_addr ));
140140 tobind.servaddr .sin_port = htons (ibind.port );
141+ break ;
141142
142143 case AF_INET6 :
143144 tobind_len = sizeof (tobind.servaddr6 );
144145 memset (&tobind.servaddr6 , 0 , sizeof (tobind.servaddr6 ));
145146 tobind.servaddr6 .sin6_family = ibind.af ;
146147 memcpy (&tobind.servaddr6 .sin6_addr .__in6_u , &ibind.addr , sizeof (tobind.servaddr6 .sin6_addr .__in6_u ));
147148 tobind.servaddr6 .sin6_port = htons (ibind.port );
149+ break ;
148150
149151 case AF_UNIX :
150152 tobind_len = sizeof (tobind.unaddr );
151153 memset (&tobind.unaddr , 0 , sizeof (tobind.unaddr ));
152154 tobind.unaddr .sun_family = ibind.af ;
155+ unlink (ibind.addr );
153156 memcpy (&tobind.unaddr .sun_path , &ibind.addr , sizeof (tobind.unaddr .sun_path ));
157+ break ;
154158
155159 default :
156160 FATAL (" Unknown address family, cant bind" );
Original file line number Diff line number Diff line change @@ -81,10 +81,13 @@ static void parse_binds(const char* optarg_const)
8181 state_start++;
8282 break ;
8383 }
84- else if (optarg[i] == ' / ' )
84+ else if (optarg[i] == ' u ' && optarg[i+ 1 ] == ' : ' )
8585 {
8686 current->af = AF_UNIX ;
8787 state = bind_parse_state::unix_path;
88+ state_start+=2 ;
89+ i++;
90+ break ;
8891 }
8992 else
9093 {
You can’t perform that action at this time.
0 commit comments