The classical theory of fields by Landau and Lifshitz, page 68 says:
As for the quantity $\epsilon^{iklm}F_{ik}F_{lm}$ (§ 25), as pointed out in the footnote on p. 63, it is a complete four- divergence, so that adding it to the integrand in $S_f$ would have no effect on the "equations of motion".
where $\epsilon^{iklm}$ is a complete antisymmetric tensor and $F_{ik}$ is a electromagnetic tensor $\partial_{i}A_k - \partial_k A_i$.
I understand that $\epsilon^{iklm}F_{ik}F_{lm}$ can be expressed as a four-divergence $$\epsilon^{iklm}F_{ik}F_{lm} = 4\frac{\partial}{\partial x^i}\left(\epsilon^{iklm}A_{k}\frac{\partial A_m}{\partial x^{l}}\right), $$ but I can't figure out why the four-divergence term does not modify the equation of motion.
Here is my thought. By the divergence theorem, the added term in the action is written as an integral on the boundary hypersurface. In this variational problem, the value of integrand on the boundary is fixed, hence the added term does not change the equation of motion.