]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Not saving ComboAddress d_local in class TeeAction this time 11889/head
authorFredericDT <frederic.dt.twh@gmail.com>
Wed, 31 Aug 2022 09:53:47 +0000 (17:53 +0800)
committerFredericDT <frederic.dt.twh@gmail.com>
Wed, 31 Aug 2022 09:53:47 +0000 (17:53 +0800)
Accoding to https://github.com/PowerDNS/pdns/pull/11889
> rgacogne
> Since we only use the local address in the constructor, I don't think we need to keep it around?
>
> FredericDT
> Possibly using that d_local in statistical function?
>
> rgacogne
> I would prefer not keeping it for now, we can always add it back later when we actually decide to do something with it :)

Signed-off-by: FredericDT <frederic.dt.twh@gmail.com>
pdns/dnsdist-lua-actions.cc

index 637e5fc1092d857a6c3617395d6a8e424a29121d..207058bdb27a329d98fadc20590679717d863973 100644 (file)
@@ -135,7 +135,6 @@ public:
 
 private:
   ComboAddress d_remote;
-  boost::optional<ComboAddress> d_local;
   std::thread d_worker;
   void worker();
 
@@ -157,12 +156,12 @@ private:
 };
 
 TeeAction::TeeAction(const ComboAddress& rca, const boost::optional<ComboAddress>& lca, bool addECS) 
-  : d_remote(rca), d_local(lca), d_addECS(addECS)
+  : d_remote(rca), d_addECS(addECS)
 {
   d_fd=SSocket(d_remote.sin4.sin_family, SOCK_DGRAM, 0);
   try {
-    if (d_local) {
-      SBind(d_fd, *d_local);
+    if (lca) {
+      SBind(d_fd, *lca);
     }
     SConnect(d_fd, d_remote);
     setNonBlocking(d_fd);