]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/fwp/fwp_vres.c
Set correctly source address for sent packets (if specified in contract)
[frescor/fwp.git] / fwp / lib / fwp / fwp_vres.c
index 64c5a70ad124e20c89092a839b8e8c6929a190c4..ad6cf0e339f0e2d1ef9d0eb777a24aeba35f639a 100644 (file)
@@ -514,7 +514,7 @@ static void* fwp_vres_tx_thread(void *_vres)
 }
 
 /*int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *epoint)*/
-int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd)
+int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd, struct in_addr  *src)
 {
        int rv = 0;
 
@@ -531,6 +531,7 @@ int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd)
        }
 
        vres->ac_sockd = sockd;
+       *src = vres->params.src;
        rv = fwp_vres_set_ac(vres->ac_sockd, vres->params.ac_id);
        if (rv)
                goto err;